Re: Why is rewrite rule adding the port

Giganews Newsgroups
Subject: Re: Why is rewrite rule adding the port
Posted by:  Álvaro_G._Vicario
Date: Thu, 17 Sep 2009

laredotornado escribió:
> I have this configuration in my Apache 2 config file:
>
> <VirtualHost *:6910>
>
>     RewriteRule ^/RE$ /RE/ [R,L]
>
> </VirtualHost>
>
> What I want is that when I type in "https://mydomain.com/RE" that the
> URL be rewritten as "https://mydomain.com/RE/" but instead what is
> happening is that the URL is being rewritten as "https://mydomain.com:
> 6910/RE/".
>
> How can I change my rewrite rule so that the port is not added?

https://mydomain.com/RE/ should be connecting to port 443, not 6910, so
there's little chance that <VirtualHost *:6910> is being used.

Are you using a proxy/router/something that's redirecting connections in
the background? If so, you have to type the full URL:

# Untested
RewriteRule ^/RE$ https://mydomain.com/RE/ [R,L]

--
--http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web:http://borrame.com
-- Mi web de humor satinado:http://www.demogracia.com
--

Replies

In response to

Why is rewrite rule adding the port posted by laredotornado on Thu, 17 Sep 2009