Home  >  Article  >  Backend Development  >  伪静态后的静态链接后面如果加参数会出错,如何让参数无效化。

伪静态后的静态链接后面如果加参数会出错,如何让参数无效化。

WBOY
WBOYOriginal
2016-06-06 20:46:061160browse

伪静态后的静态链接后面如果加参数会出错,如何让参数无效化。
就想类似discuz的论坛效果那样:
伪静态链接:http://www.discuz.net/forum-10-1.html
加参数链接:http://www.discuz.net/forum-10-1.html?a=1&b=2
效果还是http://www.discuz.net/forum-10-1.html页面的效果

如果我的站点里 我随意加了两个参数
http://www.577ruian.com/news-id-149.html?a=1&b=0 就是404出错了
我想要的效果是http://www.577ruian.com/news-id-149.html

回复内容:

伪静态后的静态链接后面如果加参数会出错,如何让参数无效化。
就想类似discuz的论坛效果那样:
伪静态链接:http://www.discuz.net/forum-10-1.html
加参数链接:http://www.discuz.net/forum-10-1.html?a=1&b=2
效果还是http://www.discuz.net/forum-10-1.html页面的效果

如果我的站点里 我随意加了两个参数
http://www.577ruian.com/news-id-149.html?a=1&b=0 就是404出错了
我想要的效果是http://www.577ruian.com/news-id-149.html

应该是伪静态规则将参数处理为文件名了,修改下你的伪静态规则应该可以处理。

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