我试图使用htaccess的重写我的网址,但它仅在第一次查询字符串工作重写URL只适用于第一个查询字符串
我要的是重写这个URL
acnologia.com/index.php?page=images&tag=nature
into something like this acnologia.com/images/nature
它在第一查询字符串工作acnologia.com/images 但如果“图像”
之后添加其他目录,这是我的.htaccess代码不起作用:
RewriteEngine On
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?page=$1&tag=$2
RewriteRule ^([a-zA-Z0-9_-]+)/$ index.php?page=$1&tag=$2
哪里是你的$ 2中定义的? – chanchal118
RewriteRule ^([a-zA-Z0-9 _-] +)/([a-zA-Z0-9 _-] +)$ index.php?page = $ 1&tag = $ 2 – Andrew