我的.htaccess 有一个小故障。我用谷歌搜索并尝试了一些没有任何结果的东西,所以我不得不求助于SOF。
考虑遵循 htaccess 规则;
# CATEGORY LISTING
ReWriteRule ^listing/category/(.*)/(.*)/(.*)/(.*) ?module=listing&type=category&get=$1&c_id=$2&c_name=$3&page=$4 [L]
ReWriteRule ^listing/category/(.*)/(.*)/(.*) ?module=listing&type=category&get=$1&c_id=$2&c_name=$3 [L]
# CATEGORY FILTER
ReWriteRule ^listing/category/(.*)/(.*)/(.*) ?module=listing&type=category&orderType=$1&order=$2&page=$3 [L]
ReWriteRule ^listing/category(.*)/(.*) ?module=listing&type=category&orderType=$1&order=$2 [L]
ReWriteRule ^listing/category/(.*) ?module=listing&type=category&page=$1 [L]
ReWriteRule ^listing/category ?module=listing&type=category [L]
这里的问题是 2 条规则相互冲突;
本规则;
ReWriteRule ^listing/category/(.*)/(.*)/(.*) ?module=listing&type=category&get=$1&c_id=$2&c_name=$3 [L]
与本规则冲突;
ReWriteRule ^listing/category/(.*)/(.*)/(.*) ?module=listing&type=category&orderType=$1&order=$2&page=$3 [L]
有没有办法解决这个冲突?
感谢您的帮助。