I have two domains:
domain1.com
domain2.com
I have one Apache 2 server, with a document root /svr.
I want the following to occur:
domain1.com
routes to the equivalent of/svr/examplepath/thisisadir/param/domain1
domain2.com
routes to the equivalent of/svr/examplepath/thisisadir/param/domain2
I have tried using a .htaccess
with RewriteEngine in /svr,
using VirtualHost declarations in sites-available for each hostname and simply using 301 redirects. However, I can't use a simple 301, as the user should still see domain1.com
in their browser.
I.e. domain1.com/about-this-site
should map to /svr/examplepath/thisisadir/param/domain1/about-this-site.
I can't get RewriteEngine to route the hostnames to their respective endpoints, any advice would be much appreciated. I'm currently attempting to use HTTP_HOST
in a .htaccess
in the server root, but the rewrite rules still aren't taking effect.
Ilmiont