Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - sub domain problem
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

sub domain problem

 Post Reply Post Reply Page  12>
Author
Dxlwebs View Drop Down
Groupie
Groupie


Joined: 27 June 2007
Location: United Kingdom
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dxlwebs Quote  Post ReplyReply Direct Link To This Post Topic: sub domain problem
    Posted: 24 July 2007 at 7:10pm
hello i wish to make sub domains and i have the forum working under forum.host.c and i have my home.asp directed to my main domain name but i cannot get the main domain to get the home.asp page it just gets the forums default.asp all the time does anyone know what codes i need to do this p.s. im using brinkster

if any one can help me quickly my email is masterdxl@hotmail.co.uk


Edited by Dxlwebs - 24 July 2007 at 7:12pm
DxL - Design Is Everything
Back to Top
KCWebMonkey View Drop Down
Senior Member
Senior Member
Avatar
Go Chiefs!

Joined: 21 June 2002
Status: Offline
Points: 1319
Post Options Post Options   Thanks (0) Thanks(0)   Quote KCWebMonkey Quote  Post ReplyReply Direct Link To This Post Posted: 24 July 2007 at 10:17pm
you would have to check with your hosting account and it's control panel.
Back to Top
Dxlwebs View Drop Down
Groupie
Groupie


Joined: 27 June 2007
Location: United Kingdom
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dxlwebs Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2007 at 6:23am
i checked with them and because its a sheared hosting i was given a code to use but its not very good it would be great if someone could help me out this is the code i was given
<%@Language=VBScript%>

<%

SiteNameURL = Request.ServerVariables("SERVER_NAME")



Select Case SiteNameURL

Case "yourdomain.com"

Response.Redirect "page1.asp"



Case "www.yourdomain.com"

Response.Redirect "page1.asp"



Case "yourotherdomain.com"

Response.Redirect "page2.asp"



Case "www.yourotherdomain.com"

Response.Redirect "page2.asp"



Case "subdomain1.yourdomain.com"

Response.Redirect "page3.asp"



Case "subdomain2.yourdomain.com"

Response.Redirect "page4.asp"



Case Else 'redirecting everything other than cases selected above

Response.Redirect "other.asp"

End Select

%>

DxL - Design Is Everything
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2007 at 7:42am
Looks like your host doesn't actually support subdomains so have given a dodgy workaround, which never works how it's intended.

If you want to use sub domains change web host, plenty of shared web hosts give you sub domains, like with our own hosting packages, checkout www.webwiz.net/webhosting/
Back to Top
Dxlwebs View Drop Down
Groupie
Groupie


Joined: 27 June 2007
Location: United Kingdom
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dxlwebs Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2007 at 9:15am
is there any way i can direct to the sub domain with out changing the name of the forums default.asp name because the code says it must be named default.asp or index.asp and index.asp does not work and the forum uses default.asp so im stuck 
DxL - Design Is Everything
Back to Top
Dxlwebs View Drop Down
Groupie
Groupie


Joined: 27 June 2007
Location: United Kingdom
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dxlwebs Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2007 at 9:56am
The Way it should be done Durh to my self!!!

instead of using asp coding that is useless by the way you need to creat a file called default.htm not asp htm people and them put this code in there!

<html>

<head>

<title>Redirect Script with JavaScript</title>

<script language=javascript>

var whois=location+" "



if (whois.indexOf("domain.com") != -1)

          { window.location ="home.asp" }



if (whois.indexOf("www.domain.com") != -1)

          { window.location ="home.asp" }



if (whois.indexOf("yourotherdomain.com") != -1)

          { window.location ="page2.html" }



if (whois.indexOf("www.yourotherdomain.com") != -1)

          { window.location ="page2.html" }



if (whois.indexOf("forum.domain.com") != -1)

          { window.location ="/forum/" }



if (whois.indexOf("subdomain2.yourdomain.com") != -1)

          { window.location ="page4.html" }



</script>

</head>

<body>

</body>

</html>

And Gues What it really works woooow lol so for anyone having the same problems as i was there is the solution in a nutshell



Edited by Dxlwebs - 25 July 2007 at 10:36am
DxL - Design Is Everything
Back to Top
WebWiz-Bruce View Drop Down
Admin Group
Admin Group
Avatar
Web Wiz Developer

Joined: 03 September 2001
Location: Bournemouth
Status: Offline
Points: 9844
Post Options Post Options   Thanks (0) Thanks(0)   Quote WebWiz-Bruce Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2007 at 9:58am
The way they have given you do it is a bad hack. It's not a sub domain at all, all this simply does is allow you to use a different domain name to your site and then redirect to a different folder or page on your site. You still end up with the URL pointing to the folder that you place the forum in.

If this is the only solution your host can give and won't set you up a sub domain, which can be done on shared hosting as we offer these, then I would just forget about using a subdomain and just place the forum in a folder on your site as this hack isn't really going to give you what you want and is error prone and isn't very search engine friendly.
Back to Top
Dxlwebs View Drop Down
Groupie
Groupie


Joined: 27 June 2007
Location: United Kingdom
Status: Offline
Points: 44
Post Options Post Options   Thanks (0) Thanks(0)   Quote Dxlwebs Quote  Post ReplyReply Direct Link To This Post Posted: 25 July 2007 at 10:40am
hmm well i had a big argument with them and they are adiment that it is the way to do it and i do have a sub domain but im no profesional so i wouldnt realy know i thought that the subdomain would give me another folder to put the other stuff in but that never happened lol if your right then i should talk to them again. what do you think?
DxL - Design Is Everything
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.