【发布时间】:2016-07-15 18:58:58
【问题描述】:
我不明白为什么,但是当我使用它时:
#RewriteRule ^/?r/(.*)$ /index.php?n=$1 [L]
将mysite.com/r/somewhat 重写为mysite.com/index.php?r=somewhat
现场工作。
但如果我使用这个:
#RewriteRule ^/?(.*)$ /index.php?name=$1 [L]
将mysite.com/somewhat 重写为mysite.com/index.php?r=somewhat,
我的网站停止工作。
我不明白为什么。有人可以帮助我吗?
如何将mysite.com/somewhat 重写为mysite.com/index.php?r=somewhat?
【问题讨论】:
-
如果你想要
?r=somewhat,那你为什么要重写?n=$1?n与r不同。
标签: php html apache .htaccess web