Forum Moderators: phranque

Message Too Old, No Replies

SSL Redirect withougt Certificate Error Message

         

bsterner

4:09 pm on Aug 25, 2006 (gmt 0)

10+ Year Member



We recently changed our domain name and bought a new SSL certificate. We've been unable to find a way to redirect users pointing to our old secure address to the new one without having the browser message popup with a warning about the domain mismatch. If they click "Ok" to proceed, the url rewriting logic functions as it should. Is there a way to redirect them before it even tries to send the cert? Any other workaround to this? Here's the rewrite code...

<VirtualHost _default_:443>

TransferLog /var/log/apache/access_log
SSLLogFile /var/log/apache/ssl_log
ErrorLog /var/log/apache/ssl_error_log

# General setup for the virtual host
DocumentRoot /home/html
<Directory "/home/html">
AllowOverride AuthConfig FileInfo Limit
Options +IncludesNOEXEC
AddHandler server-parsed .html .htm
</Directory>

# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on

# SSL Cipher Suite:
RewriteEngine on

# For Name Change
RewriteCond %{SERVER_NAME} ^.*[old_domain]\.com.*$ [NC]
RewriteRule ^/(.*)$ https:\/\/www\.[new_domain]\.com%{SCRIPT_FILENAME} [R,L]

jdMorgan

5:34 pm on Aug 25, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



If I understand this scenario, I'd suggest an intermediate non-secure "We have moved" page between the two HTTPS sites. That is, redirect old_https->interstitial_http->new_https.

Changing domains is A BIG DEAL, especially with secure pages, and shouldn't be done lightly. And the HTTP/HTTPS protocol is designed to protect users, so they can't be redirected willy-nilly without their consent.

Although this is no doubt an inconvenience for you, think of the possibilities for exploits were it not so...

Jim