繁体   English   中英

URL mod重写响应500内部服务器错误

[英]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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM