2012-07-19 61 views
0

我試圖讓下面的Mod Rewrite與沒有作爲後綴或文件名的結尾斜槓一起工作。.HTACCESS Mod重寫沒有後綴?

RewriteEngine On 
RewriteRule ^test/([^/]*)/([^/]*)/$ /example1/example2/index.php?brand= 

$1&video=$2 [L] 

上面的工作,但是如果我刪除從/ $的尾部斜槓它不會工作。

所以只是回顧:

www.example.co.uk/example/example2/index.php?brand=x &視頻= Y

重寫到

www.example.co.uk/test/brand/video/

,但我不能讓它工作

www.example.co.uk/test/brand/video

回答

0

嘗試改變從^test/([^/]*)/([^/]*)/$正則表達式^test/([^/]*)/([^/]*)/?$

+0

500內部錯誤:( – flatcap 2012-07-19 12:14:58