日期:2014-05-17  浏览次数:20412 次

一个伪静态规则的困惑,请求答疑
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个呢