还是lightinthebox网站,因为其重写规则进行了改进,产品目录的地址一般是如下格式:
http://www.yourdomain.com/xxx-xxx_c123
.htaccess里面的规则相应为:
RewriteRule ^(.*)_c([0-9]+)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
但今天见到一仿lightinthebox模板网站的.htaccess里这条规则却写成了
RewriteRule ^(.*)_c(.*)$ index\.php?main_page=index&cPath=$2&%{QUERY_STRING} [L]
导致的后果是,后台只要带有”_c”字符的地址,都无法正常打开,而是直接跳转到前台了,如Layout Box Controller等功能
所以,写.htaccess rewirte规则时,要尽量严谨,防止不应该被重写的地址被重写
