two domains and a redirect

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


Joined: 09 Nov 2003
Posts: 49
Location: washington state

PostPosted: Sun Dec 21, 2003 2:57 am    Post subject: two domains and a redirect Reply with quote

Hi again,
Hoping one of you smartie pants can help me out with another lil issue...

With the help of your tutorials I have installed and configured php and I am using bluedogs script to host two domains with my Abyss server. One is my old zapto.org domain and the other is my permanent, paid for .com domain name.

What I am trying to do is use a meta refresh on the index.html of the zapto.org domain to send traffic to the new .com address. I want to do this so that search engine bots and others linked to my site will start using the new address and I can get rid of the zapto.org one.

The main .com address is working with the script but everything freezes trying to redirect from the zapto.org address.
Any suggestions?
Back to top View user's profile Send private message Visit poster's website MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sun Dec 21, 2003 5:37 pm    Post subject: Re: two domains and a redirect Reply with quote

stitch,

Can you post here the source code of your redirection page?
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
stitch
-


Joined: 09 Nov 2003
Posts: 49
Location: washington state

PostPosted: Sun Dec 21, 2003 5:43 pm    Post subject: Reply with quote

Here's the multidomain php script I got from the forum:

Code:
<?php

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

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

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

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

}
//end duplicating, insert below.


//else show error page
else {

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

}

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


...and here's the croshay.zapto.org index.html page I'm trying to use to redirect back to croshaydesign.com

Code:
<HTML>
<HEAD>
<META HTTP-EQUIV="refresh"
content="10; URL=http://www.croshaydesign.com">
</HEAD>
<BODY>
Click <A HREF="http://www.croshaydesign.com">here</A> if you're not redirected automatically in 10 seconds.
</BODY>
</HTML>
Back to top View user's profile Send private message Visit poster's website MSN Messenger
stitch
-


Joined: 09 Nov 2003
Posts: 49
Location: washington state

PostPosted: Fri Jan 02, 2004 10:05 am    Post subject: Reply with quote

okay, since I never heard anything back I figure its just not going to work... right?
Back to top View user's profile Send private message Visit poster's website MSN Messenger
aprelium
-


Joined: 22 Mar 2002
Posts: 6800

PostPosted: Sat Jan 03, 2004 4:39 pm    Post subject: Reply with quote

stitch wrote:
okay, since I never heard anything back I figure its just not going to work... right?

We're sorry. We missed your reply.

Please try the following redirection script:

Code:

<?php

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

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

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

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

}
//end duplicating, insert below.


//else show error page
else {

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

}

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


Notice that the location header of croshay.zapto.org is a full URL (avoids the use of the index.html with the refresh meta tag).
_________________
Support Team
Aprelium - http://www.aprelium.com
Back to top View user's profile Send private message Send e-mail
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