Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

HTTPS to HTTPS Redirection

11:38 am on May 5, 2011 (gmt 0)

New User

joined:May 5, 2011
posts: 2
votes: 0

Hi All,

We have a client server hosting our web application using Apache 2.2 & Tomcat 6 in RHEL. I have setup apache re-write rule for http to https redirection and it works fine. We have two DNS names that are used to access the same application. Test1.com [Old Domain] and Test2.com[New Domain]. I want all the users trying to access [test1.com...] or [test1.com...] to [test2.com....] As mentioned, [test1.com...] to [test2.com...] redirection is working fine. I am not able to implement [test1.com...] to [test2.com....]

We have a valid certificate for 2nd domain, but not the 1st domain. So when a user try to access using 1st domain, a security warning is displayed. I want the user to be redirected to 2nd domain before the security warning is encountered. If that's not possible, I would want to redirect the user to 2nd domain after the user clicks on "Proceed anyways".

I have tried Virtual Hosts, ServerAlias, NameVirtualHost, but nothing works. Any suggestions if we can handles this via re-write would help. Any other pointers that might lead to the resolution of this issue will be appreciated.

11:56 am on May 5, 2011 (gmt 0)

Junior Member

joined:Feb 25, 2011
posts: 91
votes: 0

Maybe you could rewrite the request from https to http and first redirect the user to some temporary http domain which would then redirect to new https.
12:02 pm on May 5, 2011 (gmt 0)

New User

joined:May 5, 2011
posts: 2
votes: 0

Thanks for the reply. So you mean to say, the scenario could be as follow:

1. User tries to access [test1.com...]
2. User is redirected to [test1.com...]
3. User is redirected to [test2.com...]

If possible, can you please provide me with the rewrite condition and rules for this scenarion. I am really new to this stuff and would really appreciate the help!