伪静态异常

WBOY
WBOYOriginal
2016-06-06 20:45:481149browse

<code><ifmodule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
RewriteRule ^(.*)\.html$ index.php?g=portal&m=index&a=$1
</ifmodule>
</code>

http://www.test.com/index.php?g=portal&m=index&a=index
http://www.test.com/index.php?g=portal&m=index&a=services
http://www.test.com/index.php?g=portal&m=index&a=partner
......
转化成
http://www.test.com/index.html
http://www.test.com/services.html
http://www.test.com/partner.html
....

首页的时候导航显示已经实现伪静态
可是一跳到其他的页面,比如services partner
又变成了http://www.test.com/index.php?g=portal&m=index&a=partner
不明白?

回复内容:

<code><ifmodule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
#RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
RewriteRule ^(.*)\.html$ index.php?g=portal&m=index&a=$1
</ifmodule>
</code>

http://www.test.com/index.php?g=portal&m=index&a=index
http://www.test.com/index.php?g=portal&m=index&a=services
http://www.test.com/index.php?g=portal&m=index&a=partner
......
转化成
http://www.test.com/index.html
http://www.test.com/services.html
http://www.test.com/partner.html
....

首页的时候导航显示已经实现伪静态
可是一跳到其他的页面,比如services partner
又变成了http://www.test.com/index.php?g=portal&m=index&a=partner
不明白?

Statement:
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