on-internet
← Community

htaccess redirect specific URL to different domain

Stack Overflow ·

I have 2 domain pointing to same directory, Now I want to redirect some URLs to one specific domain and rest should be on main domain. I have one domain www.xyz.com this is main domain site will be open with this domain, from this domain I want to redirect specific URLs to different domain so if someone open www.xyz.com/a/theatre then it should redirect to www.abc.com/a/theatre. And now from same this new domain if someone click on URL which don't have "/a/theatre" in URL then it should redirect back to main domain. So if someone open www.abc.com/a/classes then it should redirect to www.xyz.co

Comments

Sign in or sign up to comment and upvote.

No comments yet.