伪静态规则,互相影响了,肿么办啊
程序员文章站
2022-06-12 21:47:08
...
RewriteRule ^/member/(.*)/(.*)/(.*)/(.*)\.html$ /member/$1\.php?$2=$3&page=$4 [NC,L]
RewriteRule ^/match/$ /member/match\.php [NC,L]
RewriteRule ^/love-store/$ /news/love\.store\.php [NC,L]
RewriteRule ^/love-store/(.*)\.html$ /news/love\.store\.php?page=$1 [NC,L]
RewriteRule ^/(.*)/$ /index.php?city=$1 [NC,L]
RewriteRule ^/member/$ /member/index\.php [NC,L]
RewriteRule ^/consum/(.*)$ /member/consum\.php?backurl=$1 [NC,L]
RewriteRule ^/login/(.*)$ /member/login\.php?backurl=$1 [NC,L]
RewriteRule ^/register/(.*)$ /member/register\.php?backurl=$1 [NC,L]
RewriteRule ^/member/meshis/(.*)\.html$ /member/meshis\.php?id=$1 [NC,L]
RewriteRule ^/member/(.*)/$ /member/$1\.php [NC,L]
RewriteRule ^/member/(.*)/(.*)/(.*)\.html$ /member/$1\.php?$2=$3 [NC,L]
RewriteRule ^/display/(.*)\.html$ /member/display\.php?mid=$1 [NC,L]
RewriteRule ^/member/(.*)/(.*)\.html$ /member/$1\.php?page=$2 [NC,L]
RewriteRule ^/vip/$ /member/vip\.php [NC,L]
RewriteRule ^/search/$ /member/search\.php [NC,L]
RewriteRule ^/news/show/(.*)\.html$ /news/show\.php?id=$1 [NC,L]
RewriteRule ^/(.*)/$ /news/$1\.php [NC,L]
RewriteRule ^/about/(.*)\.html$ /news/about\.php?id=$1 [NC,L]
RewriteRule ^/(.*)/(.*)\.html$ /news/$1\.php?page=$2 [NC,L]
我为了做个分站的伪静态加入了红色部分的规则,导致下面的全部没用了,该怎么办啊,求大神指点指点,优化下
member news文件夹是真实存在的
放到最底下测试,无效...
那肿么会无效啊..
RewriteRule ^/match/$ /member/match\.php [NC,L]
RewriteRule ^/love-store/$ /news/love\.store\.php [NC,L]
RewriteRule ^/love-store/(.*)\.html$ /news/love\.store\.php?page=$1 [NC,L]
RewriteRule ^/(.*)/$ /index.php?city=$1 [NC,L]
RewriteRule ^/member/$ /member/index\.php [NC,L]
RewriteRule ^/consum/(.*)$ /member/consum\.php?backurl=$1 [NC,L]
RewriteRule ^/login/(.*)$ /member/login\.php?backurl=$1 [NC,L]
RewriteRule ^/register/(.*)$ /member/register\.php?backurl=$1 [NC,L]
RewriteRule ^/member/meshis/(.*)\.html$ /member/meshis\.php?id=$1 [NC,L]
RewriteRule ^/member/(.*)/$ /member/$1\.php [NC,L]
RewriteRule ^/member/(.*)/(.*)/(.*)\.html$ /member/$1\.php?$2=$3 [NC,L]
RewriteRule ^/display/(.*)\.html$ /member/display\.php?mid=$1 [NC,L]
RewriteRule ^/member/(.*)/(.*)\.html$ /member/$1\.php?page=$2 [NC,L]
RewriteRule ^/vip/$ /member/vip\.php [NC,L]
RewriteRule ^/search/$ /member/search\.php [NC,L]
RewriteRule ^/news/show/(.*)\.html$ /news/show\.php?id=$1 [NC,L]
RewriteRule ^/(.*)/$ /news/$1\.php [NC,L]
RewriteRule ^/about/(.*)\.html$ /news/about\.php?id=$1 [NC,L]
RewriteRule ^/(.*)/(.*)\.html$ /news/$1\.php?page=$2 [NC,L]
我为了做个分站的伪静态加入了红色部分的规则,导致下面的全部没用了,该怎么办啊,求大神指点指点,优化下
member news文件夹是真实存在的
回复讨论(解决方案)
把红色部分的规则放到最低下啊。
把红色部分的规则放到最低下啊。
放到最底下测试,无效...
RewriteRule ^/(.*)/$ /index.php?city=$1 [NC,L]
放到最下边
我放到底部试了,404错误..
我的这个是IIS下的伪静态,不是apache的..
不管是哪里的,原则是不会变的
范围小的在前,范围大的在后
不管是哪里的,原则是不会变的
范围小的在前,范围大的在后
那肿么会无效啊..
推荐阅读