2010-11-10 35 views
0

該頁面上的第5條規則是由URL觸發的:/vehicles/Ford/Escape/2005/但是它被第9條規則重寫並且我找不到原因。我查了htaccess的標誌和L應該做的伎倆,如果我正確理解,我已經在那裏。。遇到規則後,htaccess問題沒有停止

#urls carried over from previous versions of the site 
RewriteRule ^vehicles/([^/]+)/([^/]+)/([^/]+)/([0-9]+)$ /index.php?cmd=store&sec=product&act=view&id=$4&make=$1&model=$2&year=$3&%{QUERY_STRING} [L,NC] 
RewriteRule ^vehicles/([^/]+)/([^/]+)/([^/]+)$ /index.php?cmd=store&sec=product&act=list&make=$1&model=$2&year=$3&%{QUERY_STRING} [L,NC] 
RewriteRule ^vehicles/([^/]+)/([^/]+)$ /index.php?cmd=vehicle&sec=make&subsec=model&tiersec=year&act=list&make=$1&model=$2&%{QUERY_STRING} [L,NC] 
RewriteRule ^vehicles/([^/]+)$ /index.php?cmd=vehicle&sec=make&subsec=model&act=list&make=$1&%{QUERY_STRING} [L,NC] 
RewriteRule ^vehicles/$ /index.php?cmd=vehicle&sec=make&act=list&%{QUERY_STRING} [L,NC] 

#lets not break the old vehicle search URL 
RewriteRule ^vehicle_search/$ /vehicle/search/ [R=301] 

#But fix the ones that need fixing (new standard format) 
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&subsec=$3&tiersec=$4&quadsec=$5&act=$6&%{QUERY_STRING} [L,NS] 
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&subsec=$3&tiersec=$4&act=$5&%{QUERY_STRING} [L,NS] 
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&subsec=$3&act=$4&%{QUERY_STRING} [L,NS] 
RewriteRule ^([^/]+?)/([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&sec=$2&act=$3&%{QUERY_STRING} [L,NS] 
RewriteRule ^([^/]+?)/([^/]+?)/?$ /index.php?cmd=$1&act=$2&%{QUERY_STRING} [L,NS] 

回答

1

不,第五條規則不是由您顯示的URL觸發的。該規則旨在僅捕獲vehicles/

第9條規則確實是第一條相匹配的規則。

你必須擴展第二條規則來處理斜線。

+0

謝謝,這是斜線 - dangit! :) – Webnet 2010-11-11 14:00:39