Home > Backend Development > PHP Tutorial > 伪静态规则,互相影响了,肿么办啊

伪静态规则,互相影响了,肿么办啊

WBOY
Release: 2016-06-23 13:27:11
Original
876 people have browsed it


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 ^/(.*)/$ /index.php?city=$1 [NC,L]
放到最下边

我放到底部试了,404错误..

我的这个是IIS下的伪静态,不是apache的..

不管是哪里的,原则是不会变的
范围小的在前,范围大的在后

不管是哪里的,原则是不会变的
范围小的在前,范围大的在后



那肿么会无效啊..
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template