嘿伙计们,由于我使用的是引导程序并且需要弄清楚如何修复它,因此我遇到了一个非常讨厌的重定向循环。只是提醒一下,但是从 forwarder.dev/direct-mail/{2 digit var}?CampId={7 digit var} 我有一个 Zend 路由器将它转发到其他地方,这个临时页面不存在。不幸的是,不可能跳过 htaccess 跃点。
Options +FollowSymLinks
Options -Indexes
RewriteEngine On
# Move CampID's -> directmail
RewriteCond %{HTTP_HOST} ^(www\.)?forwarder\.dev [NC]
RewriteCond %{REQUEST_URI} !^/direct-mail/
RewriteCond %{QUERY_STRING} ^(?i:campid)=(\w{2})(\w{5})
RewriteRule ^(.*)$ http://www.forwarder.dev/direct-mail/%1?CampId=%1%2 [R=301,L]
# Bootstrap stuff for Zend
Redirect 301 /index.php/ /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css) /index.php [L]
来自 LogLevel 15 的错误
[rid#b6ddb058/initial] (3) [perdir /var/www/forwarder.dev/] add path info postfix: /var/www/forwarder.dev/direct-mail -> /var/www/forwarder.dev/direct-mail/HA
[rid#b6ddb058/initial] (3) [perdir /var/www/forwarder.dev/] strip per-dir prefix: /var/www/forwarder.dev/direct-mail/HA -> direct-mail/HA
[rid#b6ddb058/initial] (3) [perdir /var/www/forwarder.dev/] applying pattern '^(.*)$' to uri 'direct-mail/HA'
[rid#b6ddb058/initial] (4) [perdir /var/www/forwarder.dev/] RewriteCond: input='www.forwarder.dev' pattern='^(www\.)?forwarder\.dev' [NC] => matched
[rid#b6ddb058/initial] (4) [perdir /var/www/forwarder.dev/] RewriteCond: input='/direct-mail/HA' pattern='!^/direct-mail/' => not-matched
[rid#b6ddb058/initial] (3) [perdir /var/www/forwarder.dev/] add path info postfix: /var/www/forwarder.dev/direct-mail -> /var/www/forwarder.dev/direct-mail/HA
[rid#b6ddb058/initial] (3) [perdir /var/www/forwarder.dev/] strip per-dir prefix: /var/www/forwarder.dev/direct-mail/HA -> direct-mail/HA
[rid#b6ddb058/initial] (3) [perdir /var/www/forwarder.dev/] applying pattern '\.(js|ico|gif|jpg|png|css)' to uri 'direct-mail/HA'
[rid#b6ddb058/initial] (4) [perdir /var/www/forwarder.dev/] RewriteCond: input='/var/www/forwarder.dev/direct-mail' pattern='!-f' => matched
[rid#b6ddb058/initial] (4) [perdir /var/www/forwarder.dev/] RewriteCond: input='/var/www/forwarder.dev/direct-mail' pattern='!-d' => matched
[rid#b6ddb058/initial] (2) [perdir /var/www/forwarder.dev/] rewrite 'direct-mail/HA' -> '/index.php'
[rid#b6ddb058/initial] (1) [perdir /var/www/forwarder.dev/] internal redirect with /index.php [INTERNAL REDIRECT]
[rid#b6dd2578/initial/redir#1] (3) [perdir /var/www/forwarder.dev/] strip per-dir prefix: /var/www/forwarder.dev/index.php -> index.php
[rid#b6dd2578/initial/redir#1] (3) [perdir /var/www/forwarder.dev/] applying pattern '^(.*)$' to uri 'index.php'
[rid#b6dd2578/initial/redir#1] (4) [perdir /var/www/forwarder.dev/] RewriteCond: input='www.forwarder.dev' pattern='^(www\.)?forwarder\.dev' [NC] => matched
[rid#b6dd2578/initial/redir#1] (4) [perdir /var/www/forwarder.dev/] RewriteCond: input='/index.php' pattern='!^/direct-mail/' => matched
[rid#b6dd2578/initial/redir#1] (4) [perdir /var/www/forwarder.dev/] RewriteCond: input='CampId=HA12345' pattern='^(?i:campid)=(\w{2})(\w{5})' => matched
[rid#b6dd2578/initial/redir#1] (2) [perdir /var/www/forwarder.dev/] rewrite 'index.php' -> 'http://www.forwarder.dev/direct-mail/HA?CampId=HA12345'
[rid#b6dd2578/initial/redir#1] (3) split uri=http://www.forwarder.dev/direct-mail/HA?CampId=HA12345 -> uri=http://www.forwarder.dev/direct-mail/HA, args=CampId=HA12345
[rid#b6dd2578/initial/redir#1] (2) [perdir /var/www/forwarder.dev/] explicitly forcing redirect with http://www.forwarder.dev/direct-mail/HA
[rid#b6dd2578/initial/redir#1] (1) [perdir /var/www/forwarder.dev/] escaping http://www.forwarder.dev/direct-mail/HA for redirect
[rid#b6dd2578/initial/redir#1] (1) [perdir /var/www/forwarder.dev/] redirect to http://www.forwarder.dev/direct-mail/HA?CampId=HA12345 [REDIRECT/301]