2013-03-24 77 views
1

我無法從/video.php/test-video重寫URL的中間/video/test-video的RewriteRules刪除.PHP在URL

我目前使用的:

RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php?/$1 [L] 
#RewriteRule ^/video/(.*)$ /video.php?/$1 [L] 

我已經rewrite index.php/url-with-white-list/url-with-white-list。 現在我有一個video.php文件使用來自數據庫的url。

我只是想改寫video.php/url-of-the-videovideo/url-of-the-video

我的index.php作品的改寫,但我不能讓我的video.php作品的改寫。

任何想法?

提前,非常感謝!

有什麼建議嗎?

由於通過提前

回答

1

解決方案:

RewriteCond %{REQUEST_URI} ^(.*)video/(.*) 
RewriteRule (.*)video/(.*)$ /video.php?/$2 [L] 

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule ^(.*)$ /index.php?/$1 [L]