I need to completely rewrite domain1.com to replace the URL *domain2.com and I haven’t been able to figure this out yet. The Apache example I’ve been given is this:
RewriteCond %{HTTP_HOST} ^sub.domain1.com$ [NC]
RewriteRule ^/(.*)$ https://sub.domain2.com/$1 [P,L]
I really need to have a path on domain2.com as well.
RewriteCond %{HTTP_HOST} ^sub.domain1.com$ [NC]
RewriteRule ^/(.*)$ https://sub.domain2.com/pathtoapp/$1 [P,L]
Anyone have any ideas?