0

我正在尝试为动态创建的子文件夹重写 htaccess 中的规则/folder/folder/folder/folder/index.php?product=car

我想要这样folder/folder/folder/folder/product/car

代码

RewriteCond %{QUERY_STRING} ^product=1$
RewriteRule ^([^/]+)/?  index.php?product=$1 [L]
4

1 回答 1

0

如果我理解正确

RewriteEngine On
RewriteRule ^((?:[^/]+?/)*)product/(.+)$ $1index.php?product=$2 [L,NC]
于 2013-08-05T11:15:31.447 回答