This works quite well as I thought it did but it does not when a person types into the url https://domainA.com
Then the customer is not redirected to domainB.com.
What am I missing here ?
SSL / HTTPSHTTP Protocol
Last Comment
btan
8/22/2022 - Mon
btan
Maybe something such as where example.com can be your domainA and www.example.com is your domainB. The difference is only on the use of "$ [NC]" meaning appended and no case and for [R=301,L], I see that you use [P] for mod_proxy, maybe we can stick with it..
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
ref - flags https://httpd.apache.org/docs/2.4/rewrite/flags.html