I am trying to forward with masking a Bluehost subdomain (login.example.com
) to another Bluehost subdomain (login.example.ca
). I did the following;
RewriteEngine On
RewriteCond %{HTTP_HOST} ^login.example.com
RewriteRule ^(.*) https://login.example.ca/directory [P]
But it is not working, Is there a way to do this?
[P]
flag inmod_rewrite
is "reverse proxy". – Stephen Ostermiller♦ Aug 1 '20 at 9:06causes the request to be handled by mod_proxy
, which I do not think is installed in most cPanel installs, particularly in shared hosting accounts (I couldn't find any reference to using mod_proxy with Bluehost, or "masking" either). Without that module installed, it will just ignore it and act as a redirect without masking. – dan♦ Aug 1 '20 at 10:18