2
我有一个htaccess的问题。我试图从http://website.tld/index.php?a=profile&u=name的链接设置为http://website.tld/nameHtaccess重写规则代码
已经有这样做的htaccess文件:
RewriteEngine on
RewriteCond %{request_filename} -f
RewriteRule ^(.*) $1 [L]
RewriteRule ^(([^/]*)+)(/([^/]{0,32})(/.+)?)?$ index.php?a=$1&q=$3 [L]
我说:
RewriteRule ^([^/]*)$ /index.php?a=profile&u=$1 [L]
,它不工作。我应该添加什么来使其工作?
有了这个,它给我500内部服务器错误... –
从第2行删除您的评论,否则500错误可能仍然会来。 – anubhava
@anubhava,即使这个请求uri检查是有点不要求'coz文件名检查应该赶上它。 –