e.php?b_name=jin&b_id=3&p=2
这是我PHP的URL,其中P是页数
我希望重写后改成b-jin-3/2/的我写了一个可是不行,不知道哪里的问题,请高手指教
RewriteCond %{QUERY_STRING} ^p=(.*)$
RewriteRule ^b-(.*)-([0-9]*)/(.*)/$ e.php?b_name=$1&b_id=$2&p=%1 [L]
这是我PHP的URL,其中P是页数
我希望重写后改成b-jin-3/2/的我写了一个可是不行,不知道哪里的问题,请高手指教
RewriteCond %{QUERY_STRING} ^p=(.*)$
RewriteRule ^b-(.*)-([0-9]*)/(.*)/$ e.php?b_name=$1&b_id=$2&p=%1 [L]
下面是我 .htaccess 文件内容,你参照下修改吧。
RewriteEngine on
RewriteCond $1 !^(index\.php|static|install|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
其中:
RewriteCond $1 !^(index\.php|static|install|robots\.txt)
是对 static 等目录不进行路径重写;祝你成功