You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Guy Speier <gu...@speier.us> on 2007/05/16 23:31:48 UTC

[users@httpd] https redirection

Hello, 

How can I redirect users visiting my web site:
https://www.foo.com/here to https://www2.foo.com/here 

thanks,
Guy

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: https redirection

Posted by Gregor Schneider <rc...@googlemail.com>.
<VirtualHost <your_ip_here:80>

    ServerName www.foo.com

[ ... ]

    RewriteEngine On
    RewriteRule ^/(.*)$ https://www1.foo.com/$1

[ ...]

</VirtualHost>


<VirtualHost <your_ip_here>:443>

 ServerAlias www1.foo.com

[ ... ]

</VirtualHost>

HTH

Gregor
-- 
what's puzzlin' you, is the nature of my game
gpgp-fp: 79A84FA526807026795E4209D3B3FE028B3170B2
gpgp-key available @ http://pgpkeys.pca.dfn.de:11371

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] Re: https redirection

Posted by Eric DuToit <er...@fedex.com>.
Assuming you are using virtual host containers, you should have separate
virtual host containers for http and https, just find the appropriate
virtual host container for the https site.

Are you placing the RewriteCond in the httpd.conf or .htaccess?



-----Original Message-----
From: Guy Speier [mailto:guy@speier.us] 
Sent: Wednesday, May 16, 2007 5:47 PM
To: users@httpd.apache.org
Subject: [users@httpd] Re: https redirection

Thanks Eric, 

I still can't get this thing to work.  I think the problem is I still
want 
all http://www.foo.com to stay on www, but I want https://www.foo.com to
go 
to https://www2.foo.com 

Any suggestions or example you can show me?
Guy 


Eric DuToit writes: 

> Mod re-write is your friend: 
> 
> http://www.google.com/search?q=mod_rewrite 
> 
>  
> 
> -----Original Message-----
> From: Guy Speier [mailto:guy@speier.us] 
> Sent: Wednesday, May 16, 2007 4:32 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] https redirection 
> 
> Hello,  
> 
> How can I redirect users visiting my web site:
> https://www.foo.com/here to https://www2.foo.com/here  
> 
> thanks,
> Guy 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server
Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org 
> 
 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server
Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Re: https redirection

Posted by Da...@Notes.YMP.GOV.
Have you tried looking at mod_alias and using the 'redirect' directive 
inside your https://www. virtual host?



Please respond to users@httpd.apache.org

To:     users@httpd.apache.org
cc:      (bcc: Dan Mitton/YD/RWDOE)
Subject:        [users@httpd] Re: https redirection
LSN: Not Relevant
User Filed as: Not a Record

Thanks Eric, 

I still can't get this thing to work.  I think the problem is I still want 

all http://www.foo.com to stay on www, but I want https://www.foo.com to 
go 
to https://www2.foo.com 

Any suggestions or example you can show me?
Guy 


Eric DuToit writes: 

> Mod re-write is your friend: 
> 
> http://www.google.com/search?q=mod_rewrite 
> 
> 
> 
> -----Original Message-----
> From: Guy Speier [mailto:guy@speier.us] 
> Sent: Wednesday, May 16, 2007 4:32 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] https redirection 
> 
> Hello, 
> 
> How can I redirect users visiting my web site:
> https://www.foo.com/here to https://www2.foo.com/here 
> 
> thanks,
> Guy 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server 
Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org 
> 
 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org




[users@httpd] Re: https redirection

Posted by Guy Speier <gu...@speier.us>.
Thanks Eric, 

I still can't get this thing to work.  I think the problem is I still want 
all http://www.foo.com to stay on www, but I want https://www.foo.com to go 
to https://www2.foo.com 

Any suggestions or example you can show me?
Guy 


Eric DuToit writes: 

> Mod re-write is your friend: 
> 
> http://www.google.com/search?q=mod_rewrite 
> 
>  
> 
> -----Original Message-----
> From: Guy Speier [mailto:guy@speier.us] 
> Sent: Wednesday, May 16, 2007 4:32 PM
> To: users@httpd.apache.org
> Subject: [users@httpd] https redirection 
> 
> Hello,  
> 
> How can I redirect users visiting my web site:
> https://www.foo.com/here to https://www2.foo.com/here  
> 
> thanks,
> Guy 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org 
> 
 


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


RE: [users@httpd] https redirection

Posted by Eric DuToit <er...@fedex.com>.
Mod re-write is your friend:

http://www.google.com/search?q=mod_rewrite



-----Original Message-----
From: Guy Speier [mailto:guy@speier.us] 
Sent: Wednesday, May 16, 2007 4:32 PM
To: users@httpd.apache.org
Subject: [users@httpd] https redirection

Hello, 

How can I redirect users visiting my web site:
https://www.foo.com/here to https://www2.foo.com/here 

thanks,
Guy


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org