Htaccess proxy redirect for root and only root
I am trying to redirect only the root domain (not its subfolders) to a different url without changing the address. I am using .htaccess and redirect with the [P] flag, which works fine for subdirectories, but not for the root.
When writing the following .htaccess everything works fine, but in a "regular" redirect and no proxy:
RewriteEngine on
Rewriterule ^$ http://mysubdomain.mydomain.com/ [R,L]
When upgrading to mod_proxy, it doesn't work (doesn't redirect without error):
RewriteEngine on
Rewriterule ^$ http://mysubdomain.mydomain.com/ [P]
It is important for me to keep the original address in the browser address bar. any idea?
thank
+3
source to share