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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/fortran/2.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 简单访问问题_.htaccess - Fatal编程技术网

.htaccess 简单访问问题

.htaccess 简单访问问题,.htaccess,.htaccess,当且仅当查询字符串中存在app=xyz时,我只想跳过上面的重写规则。将是: RewriteEngine on # if the following conditions are met, SKIP the rewriteRules. RewriteCond %{THE_REQUEST} \?abc=xyz(&(app=([a-z]+))) #i don't know it is right or wrong ########LOGIN######## RewriteCond %{TH

当且仅当查询字符串中存在app=xyz时,我只想跳过上面的重写规则。

将是:

RewriteEngine on

# if the following conditions are met, SKIP the rewriteRules.
RewriteCond %{THE_REQUEST} \?abc=xyz(&(app=([a-z]+))) #i don't know it is right or wrong

########LOGIN########
RewriteCond %{THE_REQUEST} \?event_id=156&rp=([a-zA-Z0-9=]+)
RewriteRule ^events/login.php$ http://www.xyz.com/is2011/login.php?rp=%1 [R=301,L]

########SEARCH########SEARCH########################
RewriteCond %{THE_REQUEST} \?search=([a-z]+)&event_id=156&submit=Search
RewriteRule ^is2011/([a-z]+).php$ http://www.xyz.com/is2011/$1.php?search=%1 [R=301,L]

我添加的重写规则不会在与其重写条件匹配的查询字符串中进行任何替换。skip标志跳过下一个num规则,在本例中为两个。请参阅位于的RewriteRule的指令文档。

您能解释一下您试图实现的目标吗?嗨,比格斯,我已经编辑了这个问题。请核对一下。我只想跳过某些特定条件的重写规则。只要浏览器在地址栏中找到app=xyz,就会出现这种情况。它只是跳过了重写规则
RewriteEngine on

# if the following conditions are met, SKIP the rewriteRules.
RewriteCond %{THE_REQUEST} \?abc=xyz(&(app=([a-z]+))) #i don't know it is right or wrong
RewriteRule ^(.*)$ - [skip=2]

########LOGIN########
RewriteCond %{THE_REQUEST} \?event_id=156&rp=([a-zA-Z0-9=]+)
RewriteRule ^events/login.php$ http://www.xyz.com/is2011/login.php?rp=%1 [R=301,L]

########SEARCH########SEARCH########################
RewriteCond %{THE_REQUEST} \?search=([a-z]+)&event_id=156&submit=Search
RewriteRule ^is2011/([a-z]+).php$ http://www.xyz.com/is2011/$1.php?search=%1 [R=301,L]