如何从mod_rewrite
中排除它我试过这样的事情
AddDefaultCharset UTF-8
RewriteEngine on
RewriteCond %{REQUEST_URI} !(images|\?pages=.*?) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?%{QUERY_STRING} [L]
#<IfModule mod_security.c>
#SecFilterEngine Off
#SecFilterScanPOST Off
#</IfModule>
#<IfModule security_module>
#SecFilterEngine Off
#SecFilterScanPOST Off
#</IfModule>
#<IfModule security2_module>
#SecFilterEngine Off
#SecFilterScanPOST Off
#</IfModule>
答案 0 :(得分:0)
您可以使用:
RewriteEngine on
RewriteCond %{REQUEST_URI} !/images [NC]
RewriteCond %{QUERY_STRING} !(^|&)pages= [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
即。使用RewriteCond %{QUERY_STRING}
匹配查询参数。