Forum Moderators: mack

Message Too Old, No Replies

Hosting a second site in a sub-folder

Dumb newbie webhosting / redirect question

         

Cassidy

12:14 pm on Nov 14, 2004 (gmt 0)



Hey all,

I'm entirely new to web hosting, so apologies if this is a really dumb question.

I have a domain, www.site1.co.uk and want to host a second URL I own, www.site2.co.uk, in the sub-folder www.site1.co.uk/site2/. I currently have this set up using framed web forwarding, but it's not ideal and means that all of the links display the url www.site1.co.uk/site2/newpage.htm rather than www.site2.co.uk/newpage.htm.

Can anyone tell me how I can set everything up so that www.site2.co.uk routes through to www.site1.co.uk/site2/ so they look like seperate sites? Do I need to set up DNS redirect or will I have to do this using a script?

I'm hosted on a Windows server with a domain host, and any help would be fantastic, as I'm totally stuck!

Thanks,

Cassidy.

stef24

4:13 pm on Nov 15, 2004 (gmt 0)

10+ Year Member



welcome to webmasterworld!

here are two ways of doing a redirect. the easy one is inserting a meta tag with refresh information, the harder one is using the .htaccess file. meta tag refresh is not good for search engines, so go for the .htaccess one

below is a post explaining the code to be inserted in the .htaccess file:

[webmasterworld.com...]

an .htaccess file is a simple text file which you can make in notepad. it will save it as htaccess.txt. after uploading it, you need to change the name to .htaccess (no extension) with your ftp tool

meta tag refresh. content=3 means after 3 seconds. 0 is instantly

<meta HTTP-EQUIV=refresh CONTENT="3; URL=http://www.blaha.com/">

depending on your configuration its possible to keep the url of www.site2.co.uk visible. displaying the page.html after the url is not possible as far as i know, since this is effectivly showing false info

guitaristinus

2:31 pm on Nov 16, 2004 (gmt 0)

10+ Year Member



Welcome.

You may be looking for a different answer than what stef24 gave you. A few of things you might need to do.

1) Tell your hosting company you want to add a domain to your account.
2) Tell your hosting company where the domain is going to be. This is called where the domain is "mapped". How you describe it would be fine. Your hosting company may have a "control panel" for this.
2) Get the nameservers from your hosting company and give them to the registrar of your domain. There will be a primary and a secondary one.