0

我试图把这个“index.php?page=Home”变成这个“index/Home”或者只是“Home”。我尝试阅读此“ http://www.addedbytes.com/articles/for-beginners/url-rewriting-for-beginners/ ”但仍然无法弄清楚如何去做。有什么帮助吗?

这是我的代码

RewriteEngine On
RewriteRule    ^index/([A-Za-z0-9-]+)$   index.php?page=$1    [NC,L]    # Handle requests for "index"
4

1 回答 1

0

尝试添加“?” 在变量的末尾 ([A-Za-z0-9-]+)

RewriteEngine On
RewriteRule    ^index/([A-Za-z0-9-]+)?$   index.php?page=$1    [NC,L]    # Handle requests for "index"
于 2013-05-26T06:21:43.443 回答