Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4726

Rewrite URL from one domain to another

$
0
0

@haproxy_user wrote:

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?

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4726

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>