.htaccess mod_rewrite-如何從重寫(xiě)規(guī)則中排除目錄我的.htaccess文件中有8行重寫(xiě)規(guī)則。我需要將服務(wù)器上的兩個(gè)物理目錄排除在這些規(guī)則之外,這樣就可以訪問(wèn)它們?,F(xiàn)在,所有請(qǐng)求都發(fā)送到index.php文件。要排除的目錄:“admin”和“user”。因此,http請(qǐng)求:http://www.domain.com/admin/不應(yīng)傳遞給index.php文件。ErrorDocument 404 /index.php?mod=error404 Options FollowSymLinks RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST}
!^www\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L] RewriteRule ^([^/] )
/([^/] )\.html$ index.php?lang=$1&mod=$2 [L] RewriteRule ^([^/] )/$ index.php?lang=$1&mod=home [L]
.htaccess mod_rewrite-如何從重寫(xiě)規(guī)則中排除目錄
慕的地6264312
2019-07-09 10:23:40