PDA

View Full Version : Two Sites, One Directory



LooInSpain
July 3rd, 2007, 12:03 PM
Hi,

I have been asked by a friend to create a basic website for him. He has purchased the domain and hosts it alongside his other site on the same server.

The only problem is that the two sites have been created in the same directory on the server. If you browse to www.originaldomain.co.uk (http://www.originaldomain.co.uk) you get the original site, but it you go to www.newdomain.co.uk (http://www.newdomain.co.uk) you get the same index file.

Is there a way of using the .htaccess file to redirect browsers to another file IF they browse to www.newdomain.co.uk (http://www.newdomain.co.uk), whilst still leaving www.originaldomain.co.uk (http://www.originaldomain.co.uk) as it is? This way, I would be able to create a new site in the same directory without upsetting the old site.

Any help would be great,

Loo

Filmguy15
July 3rd, 2007, 12:11 PM
Well it's probably best to put the new site in it's own folder on the server to avoid confusion or file overwriting. for example: server_root/newsite/ site files. As for the redirecting, you could go into your www.newdomain.co.uk domain settings and tell it to forward to www.originaldomain.co.uk/newsite/index.html. That's just how I've always done it, there may be a smarter solution out there.

-Filmguy

LooInSpain
July 3rd, 2007, 12:25 PM
I've just been on the server and had a look at the options available, I've tried creating a new directory and destination for the new site and have been told it will be 3 hours before being available. So I'll guess I'll let you know on three hours if it has been a success.

The Server my friend is using is less than helpful, I just wondered if there was a way around the problem without going throught the server as I'm spending so much time waiting for them, almost a month now.

Thanks for the quick reply.