Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
.htaccess 从mo重写中排除get参数_.htaccess_Mod Rewrite_Rewrite - Fatal编程技术网

.htaccess 从mo重写中排除get参数

.htaccess 从mo重写中排除get参数,.htaccess,mod-rewrite,rewrite,.htaccess,Mod Rewrite,Rewrite,* 如何将其从mod_重写中排除 我试过这样的东西 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] #<I

*

如何将其从mod_重写中排除

我试过这样的东西

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>
您可以使用:

RewriteEngine on

RewriteCond %{REQUEST_URI}   !/images [NC]
RewriteCond %{QUERY_STRING}  !(^|&)pages= [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [L]
i、 e.使用RewriteCond%{QUERY\u STRING}匹配查询参数。

提供更多详细信息^|&pages=将排除甚至是空的?pages=URL