PDA

View Full Version : مشکل mod_rewrite با چند هاست رایگان



program33r
جمعه 12 خرداد 1391, 17:59 عصر
کدی که پایین گذاشتم تو چند تا هاست رایگان امتحان کردم ولی کار نمیکنن
در ضمن میدونم که mod_rewrite.c هم فعال بود :و index.php رو هم درست کردم اما کار نکردن !
در حالی که در سیستم خودم کار میکنه


ارور :

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, admin@main-hosting.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

<IfModule mod_rewrite.c>



RewriteEngine On
RewriteRule ^$ / [L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?u=$1 [QSA,L]
</IfModule>

webiran.co
یک شنبه 14 خرداد 1391, 10:09 صبح
به نظر من خط شماره 6 اشتباه است، چون الگویی که نوشته‌اید اشتباه است و مسیر جایگزینی را هم که نوشته‌اید فقط یک / است. ولی در ورد شرط‌های خط 7 تا 9 که در مورد نبود فایل یا دایرکتوری به نام درخواست شده از طرف کاربر است، کارتان درست است، ولی چرا از پرچم QSA استفاده کرده‌اید؟
من یک مقاله در مورد استفاده از بازنویسی مسیر توی سایتم نوشتم، اگر خواستید مطالعه کنید، به نظر من کمک خواهد کرد.
www.webiran.co (http://www.webiran.co/Articles/)