2012-07-19 163 views
0

我想重寫兩個虛擬子文件夾/ content/view /和/ content/section /。我現在有這樣的:htaccess重寫子文件夾

RewriteCond %{REQUEST_URI} ^htaccesstst/content/(view|section)+ 
RewriteRule ^$ http://www\.google\.nl [L,R=301] 

此重寫/內容/內容/,/內容/視圖/,/內容/節/,這是正確的。但是它也會重寫/內容/(沒有任何內容)。我不想要這個!幫幫我?

回答

0

您可以將其替換爲:

RewriteRule ^htaccesstst/content/(view|section)/?$ http://www.google.nl [L,R=301] 
+0

這並不做的伎倆:( – 2012-07-20 12:38:15