Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSL Redirect withougt Certificate Error Message

Status
Not open for further replies.

bsterner

IS-IT--Management
Aug 25, 2006
4
0
0
US
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]
 
No. The SSL handshaking takes place before any data is actually sent or received.

If you still run both domain names and have valid SSL certs for them, then you could just set up another server (virtual or otherwise) at a different IP address. Redirection would be as simple as a meta refresh tag in the old domain's index.html. Then users would connect to one valid SSL server and be redirected to the other one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top