help with PHP script not working...

 
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions
View previous topic :: View next topic  
Author Message
AdamW1234
-


Joined: 16 Jun 2006
Posts: 5

PostPosted: Fri Jun 16, 2006 3:42 am    Post subject: help with PHP script not working... Reply with quote

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 View user's profile Send private message
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Fri Jun 16, 2006 12:18 pm    Post subject: Reply with quote

You're going to have to do better than "neither work" if you want any help.
_________________
Back to top View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
AdamW1234
-


Joined: 16 Jun 2006
Posts: 5

PostPosted: Fri Jun 16, 2006 4:09 pm    Post subject: Reply with quote

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 View user's profile Send private message
AbyssUnderground
-


Joined: 31 Dec 2004
Posts: 3855

PostPosted: Fri Jun 16, 2006 4:21 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
pkSML
-


Joined: 29 May 2006
Posts: 952
Location: Michigan, USA

PostPosted: Fri Jun 16, 2006 6:44 pm    Post subject: Reply with quote

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 View user's profile Send private message Visit poster's website
MonkeyNation
-


Joined: 05 Feb 2005
Posts: 921
Location: Cardiff

PostPosted: Fri Jun 16, 2006 6:54 pm    Post subject: Reply with quote

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 View user's profile Send private message AIM Address Yahoo Messenger MSN Messenger ICQ Number
AdamW1234
-


Joined: 16 Jun 2006
Posts: 5

PostPosted: Sat Jun 17, 2006 4:55 pm    Post subject: update: Reply with quote

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 View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> General Questions All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB phpBB Group