Forum Moderators: phranque
<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]
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