[英]URL mod rewriting response 500 Internal Server Error
我試圖重寫我的網站URL,這給我錯誤“ 500 Internal Server Error”。 這是我的代碼
RewriteEngine On
RewriteRule ^index$ /index.php [L]
RewriteRule ^([^/]*)$ /index.php?shopiId=5&shopName=$1 [L]
請幫忙。
嘗試這個。
RewriteEngine On
RewriteRule ^index$ index.php [L,QSA]
RewriteRule ^([^/]*)$ index.php?shopiId=5&shopName=$1 [L,QSA]
不要以/開頭,因為您不喜歡引用絕對路徑。 這真的意味着/index.php如果您只寫它而不帶/的話,那將意味着/var/www/index.php之類的東西。
無限循環導致出現500錯誤。
另外,您無需添加QSA標志,否則您將獲得index.php作為shopName
http://httpd.apache.org/docs/2.2/rewrite/flags.html#flag_qsa
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.