Running Multiple Sites / Domains On Abyss
Goto page 1, 2, 3, 4  Next
 
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials
View previous topic :: View next topic  
Author Message
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Tue Feb 11, 2003 10:28 pm    Post subject: Running Multiple Sites / Domains On Abyss Reply with quote

Update: Now uses the new variable naming convention.

I noticed it was often asked if it was possible to have addresses such as forum.mydomain.com, mydomain.com, and my2nddomain.com all pointing to different sites on abyss.

Although you can't actually do this via abyss (yet), you can using this small php script I wrote. If you put it in the /htdocs of your directory, and name it index.php (or other .php index extension), depending on the url the user entered it will forward to a different website.

This code is setup for 3 websites, and if neither of the addresses are entered it shows an error page of your choice. Just duplicate where indicated! To have less than three domains, simply delete 1 block of the code (from 'if' to '}')

Code:

<?php

//get domain entered in browser
if ($_SERVER['HTTP_HOST'] == "forum.yourdomain.com") {

//forward to appropriate page
header("Location : forum/index.php");
exit;

}
if ($_SERVER['HTTP_HOST'] == "yourdomain.com") {

header("Location : mainpages/home.html");
exit;

}
//duplicate from here for more addresses
if ($_SERVER['HTTP_HOST'] == "yourdomain2.net") {

header("Location : website2/home.html");
exit;

}
//end duplicating, insert below.


//else show error page
else {

header("Location : error.html");
exit;

}

?><title>Opening Your Page ::</title>


Common Problems:
- Do not include http:// in the $_SERVER['HTTP_HOST'] == "whatever" field. Http:// is not part of the domain itself, and just tells the system to request the page using the web protocol.

- Ensure when copying you include all "s. If you do not, the script will fail.

- Any others? Let me know :)


Hope this is of use to some of you,

Neil


Last edited by Bluedog on Wed Nov 19, 2003 5:00 pm; edited 3 times in total
Back to top View user's profile Send private message Visit poster's website
vbgunz
-


Joined: 02 Feb 2003
Posts: 615
Location: Florida

PostPosted: Wed Feb 12, 2003 2:52 am    Post subject: php, guide, tutorial, redirect, multiple domain, domains Reply with quote

Hey Blue this is a really cool script if it does exactly what I think it does... I own several domains and subdomains and can definately find use for your script so good looking out for contributing it to this forum ;)

I have just two questions (I haven't tried your script yet)...

Can I use the script to work the other way around? like this... Heres a snip...

if ($HTTP_HOST == "yourdomain.com/ralphsplumbing/consultation/") {

header("Location : http://www.ralphsplumbing.com");
exit;

the if leads to a directory on my site and if someone trys accessing that directory they get bounced off my server...

Also do I have to pinpoint the files? I noticed you redirected to an absolute page instead of just a directory... Can I just input directories?

I haven't tried your script but it looks like can be a very cool and handy script indeed... Thanks for putting it up ;)
_________________
Victor B. Gonzalez
http://aeonserv.com
Back to top View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Wed Feb 12, 2003 7:11 pm    Post subject: Reply with quote

yup directories are absolutely fine. Just enter:

if ($HTTP_HOST == "yourdomain.com") {

header("Location : mysubfolder/");
exit;

with mysubfolder being abyss\htdocs\mysubfolder\



You will not be able to use the script the reverse way you said, unless the script is in the directory, as it basically works like this: you open yourdomain.com - no extension so it opens index.php. Index.php checks the domain - if its xxx.com it forwards to /xxx/. If its yyy.com it goes to /yyy/, and so on. Therefore if you try to access a directory without the script in, it will just open the directory as usual.

Basically, if yourdomain.com/ralphsplumbing/consultation/ contains the script as an index file, yes it will work correctly in reverse.

Also, as http_host gets just the hostname, and we want the path, your code would be:

Code:

if ($REQUEST_URI = "ralphsplumbing/consultation/") {

header("Location : http://www.ralphsplumbing.com");
exit;

}


I'm glad you like this script, and hope it will be useful to you and others! If you need anymore info, you know where to find me!
Back to top View user's profile Send private message Visit poster's website
vbgunz
-


Joined: 02 Feb 2003
Posts: 615
Location: Florida

PostPosted: Wed Feb 12, 2003 7:38 pm    Post subject: multiples sites, php, redirects, homepages Reply with quote

This has got to be a hotscript! Thanks for the contribution ;)
_________________
Victor B. Gonzalez
http://aeonserv.com
Back to top View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Wed Feb 12, 2003 7:45 pm    Post subject: Reply with quote

Hehe, thanks :)
Back to top View user's profile Send private message Visit poster's website
stevejluke
-


Joined: 10 Feb 2003
Posts: 6

PostPosted: Fri Mar 28, 2003 4:07 am    Post subject: Reply with quote

Hey :)

Really looking forward to this script, but am getting a couple of errors (actually
just one error over and over again) :

Notice: Undefined variable: HTTP_HOST in C:\Program Files\Abyss Web Server\htdocs\index.php on line 4

repeated for each host that I am using. What could be wrong?

(I know this isn't a problem with your script, I was running another script and
kept getting same error for a variable called 'del' in it)

Thanks for any help.
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Mar 29, 2003 1:27 am    Post subject: Reply with quote

stevejluke,
search for undefined variable in the PHP forum.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
stevejluke
-


Joined: 10 Feb 2003
Posts: 6

PostPosted: Tue Apr 01, 2003 10:00 pm    Post subject: Fixed Reply with quote

Thanks.

The problem was that is use an 'old style' variable name. Now the variables
are stored in arrays. The HTTP_HOST this script uses is now defined in the
$_SERVER['HTTP_HOST'] variable. The way I read it is you should add the line:
$HTTP_HOST = $_SERVER['HTTP_HOST']
before the if statements.

I think this is right anyway.

Thanks for the script, it runs great now. :)
Back to top View user's profile Send private message
stevejluke
-


Joined: 10 Feb 2003
Posts: 6

PostPosted: Sun Apr 13, 2003 4:09 am    Post subject: A REFERER variation Reply with quote

Hi,

Just thought I would post this variation on the script. It uses REFERER as the basis for the redirection, rather than the HTTP_HOST. I do this because I use a dynamic IP redirection service (no-ip.com) and an alternate port for the webserver (because my ISP blocks port 80). To get around both these obsticles I set up two domains, one is updated with my IP, the other redirects to the first's alternate port... like this
theLikes.sytes.net => 123.45.67.890 (my IP)
*.luke.no-ip.net => theLukes.sytes.net:81 (correct port on my IP)

So when I do this, HTTP_HOST no longer works with this script since it will always be the same, but the REFERER will contain the domain names that I want to evaluate. So this is my code:

Code:

<?
//get domain entered in browser
$HOST = $_SERVER["HTTP_REFERER"];
if ($HOST == "http://steven.luke.no-ip.net/") {
header("Location : steve/index.html");
exit;
}
if ($HOST == "http://steven.luke.no-ip.net") {
header("Location : steve/index.html");
exit;
}
if ($HOST == "http://maryellen.luke.no-ip.net/") {
header("Location : maryellen/index.html");
exit;
}
if ($HOST == "http://maryellen.luke.no-ip.net") {
header("Location : maryellen/index.html");
exit;
}
if ($HOST == "http://dennis.luke.no-ip.net/") {
header("Location : dennis/index.html");
exit;
}
//... so on
//else show default page
else {
header("Location : index2.html");
exit;
}
?>


Notice that I had to put two copies of each REFERER:
Code:

http://steven.luke.no-ip.net/
//...
http://steven.luke.no-ip.net


This is because Netscape will automatically put the trailing slash at the end of the address and IE will not. If I used the trailing / alone, then IE users wouldn't get redirected correctly, and visa-versa for Netscape. Also, this script only works when the URL is masked to the Referer's.


Steve
Back to top View user's profile Send private message
iggyall
-


Joined: 13 Apr 2003
Posts: 1

PostPosted: Sun Apr 13, 2003 2:17 pm    Post subject: Still not working correctly Reply with quote

I used both defines of the script. I added the server ghost line above the if statement line. I narrowed all the errors down to one

Parse error: parse error, unexpected T_IF in C:\Program Files\Abyss Web Server\htdocs\index.php on line 6

in either instance of the posted scripts I get this error.

it is the first "if" statement line.

Any clue as to why it is doing this?
Back to top View user's profile Send private message
Vitalichka
-


Joined: 25 Jan 2003
Posts: 7

PostPosted: Thu May 08, 2003 9:30 pm    Post subject: Reply with quote

Ok my question is this.

If I am usingone IP from the service provider. I didn't buy the IP so it's not Static but it doesn't chnage much either. Maybe once a year. But that's besides the point.

So, I have one true IP and I use dydns.org to register static DNS so that when people go to such addresses as [url]armenikend.gotdns.com[/url], they are tranferred to my site. But if the IP block only has one address, and the port is only one, then how would the script work for different pages?

Would it just transfer the users to another subdirectory with an index file and there would be the page masked behing a never changing address?

If the address says.... msn.gotdns.com or something like it, and it goes to my IP, then goes to the nearest index in htdocs folder, then how would it know or how would the script let it know that when the user goes to msn2.gotdns.com, that is should go to another page.

I think I know but I would rather have you explain to me.
If you have time.
Back to top View user's profile Send private message
wayne475
-


Joined: 14 Apr 2003
Posts: 27

PostPosted: Fri May 09, 2003 5:54 am    Post subject: Reply with quote

I have gotten this script to finally work with much playing around however it doesnt really work properly. It never gets redirected. No matter what I seem to do it always get pointed to my ELSE page. Its like it never reads the URL. Maybe I have done something in the script to cause this. Here is my code below, any help would be apretiated. I just have have one if statement in their for testing purposes.


Code:

<?
//get domain entered in browser
$HOST = $_SERVER['HTTP_HOST'];
if ($HOST == "http://12.211.176.17") {
header("Location : /pw/index.html");
exit;
}
else {
header("Location : /index.html");
exit;
}
?>
Back to top View user's profile Send private message
wayne475
-


Joined: 14 Apr 2003
Posts: 27

PostPosted: Fri May 09, 2003 7:04 am    Post subject: Reply with quote

it apears as though it didnt like the "HTTP://" in the script it must assume the HTTP:// is there so it would just be
if ($HOST == 'www.website.com')
and not
if ($HOST == 'HTTP://www.website.com')
Back to top View user's profile Send private message
brad
-


Joined: 01 Sep 2002
Posts: 16
Location: TX

PostPosted: Fri Jun 13, 2003 4:45 am    Post subject: Reply with quote

aprelium, will subdomains/virtual hosts (apache) be included in future releases? This is the one feature that I would like to see in Abyss that is in Apache.

Thanks,
Brad
Back to top View user's profile Send private message
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jun 14, 2003 11:16 pm    Post subject: Reply with quote

brad wrote:
aprelium, will subdomains/virtual hosts (apache) be included in future releases? This is the one feature that I would like to see in Abyss that is in Apache.

Thanks,
Brad

We're working on that feature and on many others to be included in a future version.
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Mon Jul 28, 2003 9:13 pm    Post subject: Reply with quote

You have got to put this domain script on hotscripts.com , it is so cool.
-------------------------------------------------------------------------------------

Lets say I have a domain www.offspringvideos.com and I want a seperat sub domain to point to the same site as offspringvideos.com , If I drop your script in the htdocs folder and point sub.mydomain.com to offspringvideos.com/html_tutorial.html , sub.mydomain.com will always be. sub.mydomain.com even in the address bar it won't point to sub.mydomain.com/html_tutorial.html it will just be sub.mydomain.com and with your script I proved this. Here are some excelent examples.

http://www.offspringvideos.com
Goes to my regular web site.

http://offspring.zapto.org/ goes to
/html_tutorial.html

with out it showing

http://offspring.zapto.org/html_tutorial.html
-------------------------------------------------------------------------------------
I hope you all understand this, This script is a #1 hit , I love it.

all you have to do is for path to sub domain , you make a second index file in your htdocs and point your sub domain to that , if you use a sub directory like /2site it will not work
-------------------------------------------------------------------------------------

Blue Dog put this script on hotscripts now it Rocks ! :D
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
CapFusion
-


Joined: 18 May 2003
Posts: 617
Location: Lost in Abyss' Dungeon

PostPosted: Mon Jul 28, 2003 11:43 pm    Post subject: Reply with quote

os17fan wrote:
You have got to put this domain script on hotscripts.com , it is so cool.
-------------------------------------------------------------------------------------

Lets say I have a domain www.offspringvideos.com and I want a seperat sub domain to point to the same site as offspringvideos.com , If I drop your script in the htdocs folder and point sub.mydomain.com to offspringvideos.com/html_tutorial.html , sub.mydomain.com will always be. sub.mydomain.com even in the address bar it won't point to sub.mydomain.com/html_tutorial.html it will just be sub.mydomain.com and with your script I proved this. Here are some excelent examples.

http://www.offspringvideos.com
Goes to my regular web site.

http://offspring.zapto.org/ goes to
/html_tutorial.html

with out it showing

http://offspring.zapto.org/html_tutorial.html
-------------------------------------------------------------------------------------
I hope you all understand this, This script is a #1 hit , I love it.

all you have to do is for path to sub domain , you make a second index file in your htdocs and point your sub domain to that , if you use a sub directory like /2site it will not work
-------------------------------------------------------------------------------------

Blue Dog put this script on hotscripts now it Rocks ! :D

That is cool...

For those that understand the basic or something about applying the script should be ok but for those that do not then may run into trouble. Bluedog is great undoubtly but I can not offer to trouble-shoot a script. I am weak at scripting or trouble-shooting it to find out the actual cause. So in that regard, I offer subdomain alternative to do about the same way.

I have ton of scripting on my site that I copy from other and made up some that I can not find on Hotscript (or similiar) site.
_________________
CapFusion,...
Back to top View user's profile Send private message
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Mon Jul 28, 2003 11:52 pm    Post subject: Reply with quote

The script was originaly for 3 domains right , I modified it to handle 5 domains ! Check these out. All domains below are hosted on one server

http://offspring.zapto.org/
A Basic HTML Tutorial

http://offspring.no-ip.com
My powered by e107 web site

http://os17fan.cjb.net
A Resizing image tutorial P.S. cjb.net is not redirection any more

http://www.offspringvideos.com
My official hosted web site

http://bbs.offspringvideos.com
My phpBB2 Forum

Now thats why I think Blue Dog needs this script on hotscripts , he can make money off this , very good PHP script. :D
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
CapFusion
-


Joined: 18 May 2003
Posts: 617
Location: Lost in Abyss' Dungeon

PostPosted: Tue Jul 29, 2003 1:17 am    Post subject: Reply with quote

os17fan wrote:
The script was originaly for 3 domains right , I modified it to handle 5 domains ! Check these out. All domains below are hosted on one server

http://offspring.zapto.org/
A Basic HTML Tutorial

http://offspring.no-ip.com
My powered by e107 web site

http://os17fan.cjb.net
A Resizing image tutorial P.S. cjb.net is not redirection any more

http://www.offspringvideos.com
My official hosted web site

http://bbs.offspringvideos.com
My phpBB2 Forum

Now thats why I think Blue Dog needs this script on hotscripts , he can make money off this , very good PHP script. :D

Making money with script? Well, I do not know about this tho.

If script only work and there no alternative, then maybe.
I still prefer for those that not into scripting, should still use subdomain / subhost and or multi-domain.
_________________
CapFusion,...
Back to top View user's profile Send private message
dws1
-


Joined: 22 Jul 2003
Posts: 1

PostPosted: Tue Jul 29, 2003 3:05 pm    Post subject: Reply with quote

I tried using this script for redirection but keep getting this error.
Warning:Cannot modify header information - headers already sent by
(output started at C:\Program Files\Abyss Web Server\htdocs\index.php:9)
Line 9 is <?php
Any suggestion? :(
Back to top View user's profile Send private message
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Tue Jul 29, 2003 4:51 pm    Post subject: Reply with quote

If your talking about A redirection type domain , this does not support redirection. I tried it with my os17fan.com domain. 8)
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
CapFusion
-


Joined: 18 May 2003
Posts: 617
Location: Lost in Abyss' Dungeon

PostPosted: Tue Jul 29, 2003 7:58 pm    Post subject: Reply with quote

os17fan wrote:
If your talking about A redirection type domain , this does not support redirection. I tried it with my os17fan.com domain. 8)

These are many so reason why I do not suggest scripting to handle this kind of function.

Using Domain Name with varies HTML will do the same purpose like Index, Home, Main, Root and other in HTDOCS folder (if prefer to be place).
_________________
CapFusion,...
Back to top View user's profile Send private message
wayne475
-


Joined: 14 Apr 2003
Posts: 27

PostPosted: Mon Aug 25, 2003 11:02 pm    Post subject: Reply with quote

Been using this script since April and works great however, well check it out for your self instead of me explaining it. Here is a game I play. I made a website for it and it uses the PHP script from DOG. HTTP://WWW.PISTOLWARRIORS.COM

you will notice it looks like www.pistolwarriors.com/pw when it comes up. Is there a way to mask it so I dont see the PW supfolder>>?
Back to top View user's profile Send private message
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Tue Aug 26, 2003 3:34 am    Post subject: Reply with quote

I know a way , you have it as a sub folder in the script as /pw , it should be the full path to the folder /pw/index.php
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
wayne475
-


Joined: 14 Apr 2003
Posts: 27

PostPosted: Tue Aug 26, 2003 1:13 pm    Post subject: Reply with quote

When I do that it shows the whole thing then. www.pistolwarriors.com/pw/index.html I want people to see www.pistolwarriors.com not the whole path.
Back to top View user's profile Send private message
Ailill
-


Joined: 12 Sep 2003
Posts: 12
Location: Canada

PostPosted: Tue Sep 16, 2003 3:05 pm    Post subject: Adding another drive Reply with quote

got the code working with only minor difficulties (need to learn to type ~laffs~)

Now question is can one have a domain point to another drive on the PC?
Back to top View user's profile Send private message Visit poster's website MSN Messenger
joeplain
-


Joined: 29 Sep 2003
Posts: 1

PostPosted: Mon Sep 29, 2003 4:50 am    Post subject: Another work around for abyss.... Reply with quote

I have been using abyss for about 2 years but never used the forum. I have 41 domains on my server all post eg. www.yourdomain.com . The simplest and most reliable way is to claim your website at http://registerfly.com They have more services for domain control than I can mention, all on a control panel. What I do is use their redirect with frame option. I create the directory in abyss, the go to registerfly.com and use the redirect there. I enter the exact address in the redirect field then post it. Within 1 to 12 hours I can type in www.mydomain.com it pulls it up from abyss but the address bar still displays www.mydomain.com instead of http://4.90.678.899/folder/folder/index.html or something. Also I use Globalscape cutesite builder to create pages with their container page feature. It captures a page on my server without showing the ip addres, keeping the www.domin.com in the address bar....just a thought. Some of us are not that great with script especily on Windows (Crap)XP system. :idea:
Back to top View user's profile Send private message Send e-mail
gray
-


Joined: 15 Aug 2003
Posts: 13

PostPosted: Sat Oct 04, 2003 7:25 pm    Post subject: a couple of tips that work for me and question about robots Reply with quote

Thanks a lot for this handy little script !

This script works fine with new php if you change
$HTTP_HOST to $_SERVER['HTTP_HOST']

and I think it`s a good idea to use two entries for each url one with www and one without e.g.

"mysite.com" and "www.mysite.com"

it may also be worth mentioning that the urls should be pointing to the server ip , it won`t work if you`ve used webforwarding.

Does anyone know if this script affects search engine robots ? will they read the just the script or will they read the actual page the script points to ?
Back to top View user's profile Send private message Visit poster's website ICQ Number
Daniel
-


Joined: 24 Jun 2003
Posts: 12
Location: Concord, NC

PostPosted: Thu Oct 09, 2003 5:46 am    Post subject: Reply with quote

How do I even get a domain on my webserver... Like.. the DNS settings.. would that be my IP? if so.. my IP changes all the time.. then what? How can I get my own DNS?
_________________
--Daniel
http://forums.pastrealm.com
Back to top View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Oct 12, 2003 4:19 pm    Post subject: Reply with quote

Daniel wrote:
How do I even get a domain on my webserver... Like.. the DNS settings.. would that be my IP? if so.. my IP changes all the time.. then what? How can I get my own DNS?

Use a dynamic DNS service such as http://www.dyndns.org or http://www.no-ip.com .
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
park
-


Joined: 17 Jul 2003
Posts: 16
Location: Holland

PostPosted: Thu Oct 16, 2003 2:31 am    Post subject: Reply with quote

I tried to use this little script, but it seem sit doesn't work with latest edition of php (4.3.3)
Back to top View user's profile Send private message Yahoo Messenger MSN Messenger ICQ Number
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Fri Oct 24, 2003 11:29 pm    Post subject: Reply with quote

Wow...been a LONG time since I've been on here.

I am glad my script has helped a lot of you, I originally made it to serve myself, and thought I'd give it out to you.

It seems the biggest problems is ensuring Register Globals is enabled in php.ini, and that this is saved into the system dir, ie /windows/system32

:D
Back to top View user's profile Send private message Visit poster's website
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Fri Oct 24, 2003 11:35 pm    Post subject: Reply with quote

As stevejluke mentioned some time back, replacing $HTTP_HOST with $_SERVER['HTTP_HOST'] will solve this problem. The script I originally posted uses the old PHP variable naming convention, basically because when I wrote it, $HTTP_HOST was standard.

Http://www.blue-networks.net/ is now my home, if anyone is interested.
Back to top View user's profile Send private message Visit poster's website
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Sat Oct 25, 2003 3:26 am    Post subject: Reply with quote

Hey Bluedog , Change your Front page script to match those varibals so people don't get confused when they install it , I have register globals off to test it and it worked fine , just change that to reflect your new varibals , do you really think people are going to read this all the way to page 3 , I don't think so. Change it now!

Note: On my tutorials , I only wanted you to put register Globals On that way if you wanted to run Bluedog's multiple domain PHP script , you could. Since he found out a way to run it with out Reg Globals On , go ahead and change that to Off if you want. Use that varible Bluedog posted
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
park
-


Joined: 17 Jul 2003
Posts: 16
Location: Holland

PostPosted: Mon Oct 27, 2003 2:22 pm    Post subject: Reply with quote

cool, this script works great!
Back to top View user's profile Send private message Yahoo Messenger MSN Messenger ICQ Number
os17fan
-


Joined: 21 Mar 2003
Posts: 531
Location: USA

PostPosted: Tue Oct 28, 2003 8:49 am    Post subject: Reply with quote

Don't forget to check out the domain form creator that I created , its posted in the tutorials. I can configure the form to handle 24 domains instead of 12 if you want. Later!
_________________
This web server is the best !
Back to top View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Tue Oct 28, 2003 6:22 pm    Post subject: Reply with quote

cool, this will be helpful for people who are not experienced with php or code editing :D
_________________
----------------------
Http://www.blue-networks.net/
----------------------
Back to top View user's profile Send private message Visit poster's website
DarkFiraga
-


Joined: 16 Oct 2003
Posts: 10

PostPosted: Thu Oct 30, 2003 7:01 pm    Post subject: Reply with quote

Umm, I think I'm doing this REALLY wrong cause I'm kinda confused
Yea, I'm new to php...thats probably why.

But, I have barely started my site yet, and I'm using a just stupid page for my index (and its not even related to my site) but I wanted to do this part to get it over with.

Now heres what I have:
Code:

<?php

//get domain entered in browser
if ($HTTP_HOST == "www.ultimastar.net") {

//forward to appropriate page
header("Location : index.html");
exit;

}
if ($HTTP_HOST == "http://68.6.216.163:8475/index.html") {

header("Location : index.html");
exit;

}
//end duplicating, insert below.


//else show error page
else {

header("Location : error.html");
exit;

}

?><title>Opening Your Page ::</title> 
 


What am I doing wrong? Or what can I correct? Help is appreicated.
Back to top View user's profile Send private message AIM Address MSN Messenger
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Oct 30, 2003 8:08 pm    Post subject: Reply with quote

To DarkFiraga , have you tried using my domain form , you don't have to turn register globals on for it to work and im sure bluedog doesn't mind me using a form for his site script , im just making it easier for people and thats why its on hotscripts.com called Multiple Site Creator :twisted:

http://www.multiple-sites.tk
Back to top View user's profile Send private message Visit poster's website
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Fri Oct 31, 2003 8:38 pm    Post subject: Reply with quote

yeh, it's fine, I'm glad my script's been of use. If you want, chuck a link to http://www.blue-networks.net/ on the site and I'd be eternally grateful :) heh..

anyway, yeh, before submitting a problem, I'd suggest everyone tries the nice script that is now available :)
_________________
----------------------
Http://www.blue-networks.net/
----------------------
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Sun Nov 02, 2003 2:44 am    Post subject: Reply with quote

Thanks Bluedog for the support of my creativity , I will add a link to your site as soon as possible , right now , im cooking pizza lol. Later! :D
Back to top View user's profile Send private message Visit poster's website
senshi
-


Joined: 05 Nov 2003
Posts: 385
Location: UK

PostPosted: Thu Nov 06, 2003 3:01 pm    Post subject: Reply with quote

aprelium wrote:
Daniel wrote:
How do I even get a domain on my webserver... Like.. the DNS settings.. would that be my IP? if so.. my IP changes all the time.. then what? How can I get my own DNS?

Use a dynamic DNS service such as http://www.dyndns.org or http://www.no-ip.com .


Havent checked lately, but dyndns over no-ip anyday...

A number of issues I encountered with no-ip.com, for some users like me that are stuck behind an ISP proxy server, your IP address is always reported wrong by no-ip.com even after following the guidance of the no-ip.com tech help. Also it is slow to update, anything up to 30mins (even though the quoute less than 10mins)

DynDNS, instant update, correct IP identifaction every time and all I can say is the help is prompt should you need it... nuff said (I have used dyndns for 2 years now and no problems)

IM one of those guys that likes to try, took me about 30mins to work around my ISP proxy servers, they do hate me to as I also FIXed my IP address, LMAO coz theyre supposed to change every 6-8 minutes but they decided to go the proxy way, to most net muppets, thats a problem and most give up as a lost cause and ISPs know that.

So if you have an issue with your ISP, theirs usually a way around it, as for blocking port 80! how does your ISP server up their homepage or how do you browse the net Daniel?

Would like to know if you sorted it out.
Back to top View user's profile Send private message
Bluedog
-


Joined: 05 Jan 2003
Posts: 179

PostPosted: Wed Nov 19, 2003 4:56 pm    Post subject: Reply with quote

The script now supports php 4.3.* right away, I have changed the variable naming to support the new php variable naming convention.

Yey.. :D
_________________
----------------------
Http://www.blue-networks.net/
----------------------
Back to top View user's profile Send private message Visit poster's website
housler
-


Joined: 11 May 2003
Posts: 2

PostPosted: Thu Nov 27, 2003 5:48 am    Post subject: error message Reply with quote

I keep getting this error:

Warning: Cannot modify header information - headers already sent by (output started at C:\Program Files\Abyss Web Server\htdocs\index.php:8) in C:\Program Files\Abyss Web Server\htdocs\index.php on line 13


Here is the script:

<?php

//get domain entered in browser
$HOST = $_SERVER['HTTP_HOST'];
if ($HOST == "www.mystockmarket.net") {
header("Location : /msm/index.html");
exit;
}
if ($HOST == "www.u1mybid.com") {
header("Location : /cgi-bin/auction/auction.pl");
exit;
}
?>
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Nov 27, 2003 6:07 am    Post subject: Reply with quote

Dude , try out my Virtual host program

http://www.multiple-sites.tk

(easy setup) 8)
Back to top View user's profile Send private message Visit poster's website
housler
-


Joined: 11 May 2003
Posts: 2

PostPosted: Thu Nov 27, 2003 1:36 pm    Post subject: mutiple site creator Reply with quote

I did but it didn't work. When I completed the form it didn't create a file. It only showed your php scripted.

I checked to see if php was working on my system by doing the:

<?php
phpinfo();
?>

And it worked great. All info was shown.

I had the same idea as you, use the script and it would work. :lol:

Any other usggestions??
Back to top View user's profile Send private message
wayne475
-


Joined: 14 Apr 2003
Posts: 27

PostPosted: Thu Nov 27, 2003 3:57 pm    Post subject: Reply with quote

I did you get your domain name in the URL to show just the domain name? My domains come up like this http://www.pistolwarriors.com/pistolwarriors/pw/<indexfile>. I want it to read just http://pistolwarriors.com
Back to top View user's profile Send private message
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Nov 27, 2003 4:30 pm    Post subject: Reply with quote

you need to read the instructions on the main page ok !

doing this /site/ will show (www.you.com)
Back to top View user's profile Send private message Visit poster's website
TRUSTAbyss
-


Joined: 29 Oct 2003
Posts: 3752
Location: USA, GA

PostPosted: Thu Nov 27, 2003 4:31 pm    Post subject: Reply with quote

housler

You have to save the source code as index.php ~! It doesn't
create a index.php file for you , all it does is generate the code after your done. :D
Back to top View user's profile Send private message Visit poster's website
Kent
-


Joined: 12 Jan 2003
Posts: 137

PostPosted: Thu Jan 08, 2004 6:06 am    Post subject: new code Reply with quote

here is a code that actually works and masks the real url to the multiple sites
be sure you title the php script to your servers default index.php or whatever you have made it default to, on my server its pal.php its probly not the same on yours, index.php is your best bet
Code:

<?
$page = $_GET['site'];
switch ($site) {
case "mark":
$s = "http://your.com/mask/mark";
break;
case "bob":
$s = "http://your.com/mask/bob";
break;
case "billy":
$s = "http://your.com/mask/billy";
break;
case "sally":
$s = "http://your.com/mask/sally";
break;
case "lisa":
$s = "http://your.com/mask/lisa";
break;
case "karren":
$s = "http://your.com/mask/karren";
break;
case "terra":
$s = "http://your.com/mask/terra";
break;   
}
include "$s";
?>


to get the script to work just type in your url like this:

http://your.com/?site=bill
http://your.com/?site=terra

and so on, this will also work for remotely hosted sites
so if your friend has a site on geocities or has a long nasty url
you can put that url in your script so all they will have to do is type in http://your.com/?site=sally
but they need to make sure all files are linked properly or the script will break links and img src code.
Back to top View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Aprelium Forum Index -> Tutorials All times are GMT + 1 Hour
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
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