Sunday, 25 August 2013

Apache internal forward from domain to another domain sub page

Apache internal forward from domain to another domain sub page

I'd like to do a rather simple thing using apache rewrite module.
When the user goes to www.example.com I'd like him to be redirected to my
other domain in a sub page www.anotherdomain.com/subpage.html, for that I
did:
RewriteEngine On
RewriteRule example.com http://anotherdomain/folder1/page2.html [PT]
But for some reason it's redirecting to http://anotherdomain.com and
ignoring the subfolder/subpages.
The user should also not be aware that when accessing example.com they are
being redirected to another domain. This is because I want to make some
subpages as landing pages to some domains I bought.
Any ideas?

No comments:

Post a Comment