我的实际代码是这条和最后一条规则正常工作,有人能帮忙吗?
非常感谢!
RewriteEngine On RewriteCond %{HTTP_HOST} ^diamantesgould.net [NC]
RewriteRule ^(.*)$ http://www.diamantesgould.net/$1 [R=301]
RewriteRule ^([a-z0-9_-]+)$ /index.php?po=$1 [NC]
RewriteRule ^categories/([a-z0-9_-]+)$ /index.php?ca=$1 [NC]
RewriteRule ^videos/([a-z0-9_-]+)$ /video.php?movie=$1 [NC]
RewriteRule ^galleries/([a-z0-9_-]+)$ /galleries.php?gallery=$1 [NC]注意:问题在于它通过键入mydomain.com/画廊或mydomain.com/画廊/1或mydomain.com/画廊/1/2/3/4显示相同的页面.它总是显示图库页面(mydomain.com/)
发布于 2012-03-25 21:52:12
我在你的regexp中看到了一些可能不是很严格的东西:
[a-zA-Z0-9_-]+ should be [a-zA-Z0-9_\-]+, - is a special char so must be escaped to be used only as a charhttps://stackoverflow.com/questions/9864391
复制相似问题