# Two Sites, One Directory

**URL:** <https://forum.kirupa.com/t/two-sites-one-directory/231292>\
**Category:** web dev\
**Created:** [July 3, 2007, 3:03pm UTC](https://forum.kirupa.com/t/two-sites-one-directory/231292 "2007-07-03T15:03:13Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LooInSpain](https://avatars.discourse-cdn.com/v4/letter/l/a88e57/32.png) [@LooInSpain](https://forum.kirupa.com/u/LooInSpain)\
**Post date:** [July 3, 2007, 3:03pm UTC](https://forum.kirupa.com/t/two-sites-one-directory/231292/1 "2007-07-03T15:03:13Z")

</div>

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 you get the original site, but it you go to [URL=“http://www.newdomain.co.uk”]www.newdomain.co.uk](http://www.originaldomain.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, whilst still leaving [URL=“http://www.originaldomain.co.uk”]www.originaldomain.co.uk](http://www.newdomain.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
