我正在使用其他人所做的自定义cms。 问题是,当我通过htaccess添加重定向时,它总是复制第一个参数(此处命名为“perf”)我尝试添加其他参数,如您在此行中所见 - >的index.php PERF = $ 1和;子= $ 16
所以,这是htaccess代码:
RewriteEngine on
#URL AMIGABLE UNIVERSAL
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?perf=$1&sub=$2&cat=$3
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?perf=$1&sub=$2
RewriteCond %{REQUEST_URI} !^/[0-9]+\..+\.cpaneldcv$
RewriteCond %{REQUEST_URI} !^/[A-F0-9]{32}\.txt(?:\ Comodo\ DCV)?$
RewriteRule ^([a-zA-Z0-9_-]+)$ index.php?perf=$1
所以网址看起来像这样 - > http://www.test.com/questions?perf=questions我需要它http://www.test.com/questions
有没有办法删除重复的部分?
感谢,