1
由於某些未知原因,我的重寫規則不會觸發。你能建議嗎?mod_rewrite幫助
/extranet/.htaccess
(1)/extranet/stable/
/extranet/dev/
/extranet/dev/.htaccess
(2)
第一htaccess的所有通信重定向到穩定文件夾,除了網址特別指出在dev文件夾中。這工作正常。
在dev文件夾中,第二個.htaccess應該將/extranet/dev/foo/
重寫爲/extranet/dev/index.php?app=foo
。
這讓我失望了。
IndexIgnore *
Options +FollowSymLinks
RewriteEngine On
RewriteBase/
#--------------------------------------------
# FRIENDLY URLs
#--------------------------------------------
# if the following conditions are met, SKIP the rewriteRules.
RewriteCond %{REQUEST_FILENAME} -f [NC,OR]
RewriteCond %{REQUEST_FILENAME} -d [NC,OR]
RewriteCond %{REQUEST_URI} ^/(|_css/|_js/|_img/) [NC]
RewriteRule . - [L]
RewriteRule ^([A-Za-z0-9-]+)/?$ index.php?app=$1 [NC,QSA,L]
即使我刪除整個rewriteCond,只留下最後一個rewriteRule指令,重寫不會啓動。 – pixeline 2009-08-11 14:39:06