这是我的.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]
我希望能够直接输入此地址:
mysite.com/system/application/views/req-php.php?_INPUT&f=xxx
答案 0 :(得分: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]