我有这个
http://localhost/index.php?page=1
我想展示这个
http://localhost/index.php/page/1
我现在在 .htaccess 上有这段代码:
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^index/([0-9]+)$ index.php?page=$1
但这行不通,请帮助我。
最佳答案
您缺少脚本扩展 page
部分
RewriteRule ^index.php/page/([0-9]+)$ index.php?page=$1
关于.htaccess - 分页网址上的友好网址?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52787315/