View previous topic :: View next topic |
Author |
Message |
AdamW1234 -
Joined: 16 Jun 2006 Posts: 5
|
Posted: Fri Jun 16, 2006 3:42 am Post subject: help with PHP script not working... |
|
|
this apparantly should enable sub domains... i have a whole website in theunderground.tat2.co.nz and also a simple page saying "hi al" in tat2.co.nz - but neither work. please help. Adam.
Quote: |
<?php
}
if ($_SERVER['HTTP_HOST'] == "tat2.co.nz") {
header("Location : mainpages/index.htm");
exit;
}
if ($_SERVER['HTTP_HOST'] == "202.154.159.191") {
header("Location : mainpages/index.htm");
exit;
}
if ($_SERVER['HTTP_HOST'] == "theunderground.tat2.co.nz") {
header("Location : theunderground/index.html");
exit;
}
if ($_SERVER['HTTP_HOST'] == "tmi.tat2.co.nz") {
header("Location : tmi/index.htm");
exit;
}
if ($_SERVER['HTTP_HOST'] == "aag.tat2.co.nz") {
header("Location : aag/index.htm");
exit;
}
if ($_SERVER['HTTP_HOST'] == "ua.tat2.co.nz") {
header("Location : ua/index.htm");
exit;
}
if ($_SERVER['HTTP_HOST'] == "moko.tat2.co.nz") {
header("Location : moko/index.htm");
exit;
}
//end duplicating, insert below.
//else show error page
else {
header("Location : error.html");
exit;
}
?><title>Opening Your Page ::</title> |
|
|
Back to top |
|
|
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Fri Jun 16, 2006 12:18 pm Post subject: |
|
|
You're going to have to do better than "neither work" if you want any help. _________________
|
|
Back to top |
|
|
AdamW1234 -
Joined: 16 Jun 2006 Posts: 5
|
Posted: Fri Jun 16, 2006 4:09 pm Post subject: |
|
|
as in theunderground.tat2.co.nz doesn't work... thats the other subdomain with content in it. the link doesn't work for some reason, i've spell checked too. |
|
Back to top |
|
|
AbyssUnderground -
Joined: 31 Dec 2004 Posts: 3855
|
Posted: Fri Jun 16, 2006 4:21 pm Post subject: |
|
|
Quote: | Forbidden
You don't have permission to access / on this server.
Apache/1.3.34 Server at theunderground.tat2.co.nz Port 80 |
???
Quote: | Response Headers - http://tat2.co.nz/
Age: 0
Date: Fri, 16 Jun 2006 15:22:19 GMT
Content-Length: 344
Content-Type: text/html
Last-Modified: Thu, 15 Jun 2006 15:15:17 GMT
Server: Abyss/2.3.2-X1-Win32 AbyssLib/2.3.2
200 OK |
Seems its because the domain providor does not allow subdomains.
EDIT: You should get a REAL domain. _________________ Andy (AbyssUnderground) (previously The Inquisitor)
www.abyssunderground.co.uk |
|
Back to top |
|
|
pkSML -
Joined: 29 May 2006 Posts: 952 Location: Michigan, USA
|
Posted: Fri Jun 16, 2006 6:44 pm Post subject: |
|
|
Hey Adam, this is Stephen.
I have a suggestion or two for you.
1. See if your domain has a "wildcard" option. This will let you have abc.mysite.com, me.mysite.com, you.mysite.com, and so on.
2. If you can't have a wildcard domain, you can get one for free at http://dyndns.com. This is how we host http://calvarybaptist.homedns.org for our church. We used this one until we purchased a domain name, but that URL still works.
To work with dyndns.com, you must register an account. When you login, go to https://www.dyndns.com/account/services/hosts/dyndns/add.html. Select the 'enable wildcard' option. Then you can have as many subdomains as you want. _________________ Stephen
Need a LitlURL?
http://CodeBin.yi.org |
|
Back to top |
|
|
MonkeyNation -
Joined: 05 Feb 2005 Posts: 921 Location: Cardiff
|
Posted: Fri Jun 16, 2006 6:54 pm Post subject: |
|
|
The Inquisitor wrote: | Seems its because the domain providor does not allow subdomains. |
Also if he used the code he pasted above then he'll have parse errors. _________________
|
|
Back to top |
|
|
AdamW1234 -
Joined: 16 Jun 2006 Posts: 5
|
Posted: Sat Jun 17, 2006 4:55 pm Post subject: update: |
|
|
http://www.tat2.co.nz/adam/tempimages/domains4less.jpg
is a pic of my current domain setup to get around the wildcard issue, i've written to them asking to fix the problem, they seem to be good, so i'll see where it gets me.
PS: cheers for the help
Adam. |
|
Back to top |
|
|
|