.htaccessurl-rewritinghtmlmultiple-domains

Redirect masked URL to different domain on same server


I'm trying to use an existing server to essentially run 2 websites. At present there are 2 domains pointing to the same location:

The Schoc site runs just fine, the other site is the challenge. So it seems possible to have files and subfolders that can be addressed like this:

http://www.chocolatetherapy.com/homepage.htm

And,

http://www.chocolatetherapy.com/contact/

So ideally I want to have 2 homepages on the same server, one that appears with schoc.co.nz, the other (above) with chocolatetherapy.com - can I use an htaccess file?

I know the logical thing to do would be these on separate servers, but the domains and hosting is fairly entangled and I'm afraid to start making changes there.


Solution

  • The simplest was to be able to do this if you can forward the domain, but mask it with your meta tags, for example if you are with Godaddy, there is a option to forward with masking, you would then set up another directory within your server for example

    Public_html/chocolatetherapy
    

    and you will have your original schoc.co.nz website in the public html directory.

    You would then forward the domain of chocolatetherapy.com to

    schoc.co.nz/chocolatetherapy/index.html
    

    but mask it so it only shows chocolatetherapy.com