[英].htaccess rules in folder are not working
I have a folder with name products
and i want to rewrite the with htaccess (htaccess is placed in folder) 我有一个名称
products
的文件夹,我想用htaccess重写(htaccess放在文件夹中)
the code i have used is 我使用的代码是
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /products/
RewriteRule ^([a-z]+)/([a-z]+)/([0-9]+)$ index.php?product=$1&brand=$2&page=$3 [L,QSA]
Now what i am trying to achieve is i want to convert 现在我想要实现的是我想要转换
abc.com/products/index.php?product=toshiba-laptop&brand=toshiba&page=3
to 至
abc.com/products/toshiba-laptop/toshiba/3
Solve myself thanks code is use is 解决自己的感谢代码是使用
RewriteRule ^([^/.]+)/?$ index.php?cat=$1 [L]
RewriteRule ^([^/]*)/([a-z-]+)$ index.php?cat=$1&brand=$2 [L]
RewriteRule ^([^/]*)/([0-9]+)$ index.php?cat=$1&page=$2 [L]
#RewriteRule ^([^/]*)/([a-z-]+)/(.*)/$ index.php?cat=$1&brand=$2&page=$3 [L]
RewriteRule ^([a-z]+)/([a-z]+)/([0-9]+)$ index.php?cat=$1&brand=$2&page=$3 [L,QSA]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.