2014-10-17 89 views
0

這是我的.htaccess文件:如何從.htaccess規則中排除頁面?

Options -Indexes 
RewriteEngine on 
RewriteCond $1 !^(index\.php|css|images|jscript|user_guide|login|en|favicon.ico|uploads|script.php) 
RewriteRule ^(.*)$ index.php/$1 [L] 

而且我希望能夠鍵入此ADRESS直接:

mysite.com/system/application/views/req-php.php?_INPUT&f=xxx 

回答

0

您可以添加其他的負面RewriteCond避免重寫這個新網址:

Options -Indexes 
RewriteEngine on 

RewriteCond %{THE_REQUEST} !\s/system/application/views/req-php\.php\?_INPUT&f= [NC] 
RewriteCond $1 !^(index\.php|css|images|jscript|user_guide|login|en|favicon.ico|uploads|script.php) 
RewriteRule ^(.*)$ index.php/$1 [L] 
+0

它沒有工作=/xxx可以改變太btw。 – 2014-10-17 11:55:08

+0

確定它現在更新。告訴我您在瀏覽器中看到的確切網址,並確保這是「RewriteEngine On」行下面的第一條規則。 – anubhava 2014-10-17 12:05:22