0

Here's my situation. I have a legacy website in the root folder of my public_html. This is cumbersome because I have other subdomains and addon domains to manage. So I've designed a web 2.0 website to replace the legacy one, and here is my problematic.

Legacy Website http://www.annexation.ca/

New Website http://www.annexation.ca/annexation.ca/

Now what I need to accomplish here, is add some code to .htaccess that will enable the new website to show up with the url of the old one. So I need not only a redirect to the folder, but also a mask that makes the website show up as it did before.

Cheers.

1 Answers1

0

Put this code in your DOCUMENT_ROOT/.htaccess file:

RewriteEngine On

RewriteCond %{HTTP_HOST} ^(www\.)?annexation\.ca$ [NC]
RewriteRule !^annexation\.ca /annexation.ca%{REQUEST_URI} [L,NC]
anubhava
  • 761,203
  • 64
  • 569
  • 643