1
目前我正在做這樣的事情在我的.htaccess:停止Apache重寫規則
RewriteRule ^assets/(.*)$ application/views/assets/$1
RewriteCond %{REQUEST_FILENAME} !/application/views/assets/.*
# Protect application and system files from being viewed
RewriteRule ^(?:application|modules|system)\b.* index.php/$0 [L]
# Allow any files or directories that exist to be displayed directly
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# Rewrite all other URLs to index.php/URL
RewriteRule .* index.php/$0 [PT]
但是,是有辦法,我可以刪除第一的RewriteCond,如使用[L]或[ S = 4],這樣,一旦第一個RewriteRule(資產的一個)適用,我們繼續前進,不再應用更多規則?
(順便說一句,這是用於KohanaPHP框架.htaccess文件。)
哇,似乎更多的工作不僅僅是離開的RewriteCond線。然而,你向我解釋了一些事情。你是贏家。 – Volomike 2011-04-21 01:08:22