https://issues.apache.org/bugzilla/show_bug.cgi?id=55029

            Bug ID: 55029
           Summary: Up to apache-2.2.24 mod_rewrite interpretes port
                    suffix as a part of HTTP_HOST
           Product: Apache httpd-2
           Version: 2.2.24
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_rewrite
          Assignee: [email protected]
          Reporter: [email protected]

On a web-server, running apache2-2.2.24 I have a SSL-enabled vhost on
non-standard (3443) port.

Trying to force usage correct server-name I put in vhost's Directory section of
httpd-ssl.conf:
...
#
RewriteEngine on
#
RewriteCond %{HTTPS} ^on$
RewriteCond %{HTTP_HOST} !^admin\.mydomain\.ru$
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{SERVER_PORT} =3443
#
RewriteRule ^/?(.*) https://admin.mydomain.ru:%{SERVER_PORT}/$1 [L,R,NE]
#
...

and find redirect loop.

Updating Condifion including server port value in HTTP_HOST string made
redirect working, but I find it incorrect.

Operable redirect list is:
...
RewriteEngine on
#
RewriteCond %{HTTPS} ^on$
RewriteCond %{HTTP_HOST} !^admin\.mydomain\.ru:3443$
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{SERVER_PORT} =3443

RewriteRule ^/?(.*) https://admin.mydomain.ru:%{SERVER_PORT}/$1 [L,R,NE]
...

P.S. Also, at least for SSL-connection "Canonical Hostnames" section of
http://httpd.apache.org/docs/2.2/rewrite/remapping.html in description of
non-standard port usage case is incorrect.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to