Home > Backend Development > PHP Tutorial > 一个伪静态规则的困惑,请求答疑解决办法

一个伪静态规则的困惑,请求答疑解决办法

WBOY
Release: 2016-06-13 13:29:59
Original
1044 people have browsed it

一个伪静态规则的困惑,请求答疑
RewriteRule ^/?([a-zA-Z\-]+)-exam.html$ class-exam.php?classname=$1 [L]

这个规则是正确的;

地址访问:“http://www.xxx.com/abc-exam.html”但是访问页面总是404


但是如果写成:
RewriteRule ^/?([a-zA-Z\-]+)-exam.html/$ class-exam.php?classname=$1 [L]

地址访问“http://www.xxx.com/abc-exam.html/” 就可以导向指定页面。


请问哪儿出错了?为什么非要加那个“/”。谢谢

------解决方案--------------------

探讨
原来是和这个冲突了:
RewriteRule ^([a-z\-]+)\.html$ class.php?classname=$1 [L]


那请问怎么区分这2个呢
Related labels:
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