View previous topic :: View next topic |
Author |
Message |
stitch -
Joined: 09 Nov 2003 Posts: 49 Location: washington state
|
Posted: Sun Dec 21, 2003 2:57 am Post subject: two domains and a redirect |
|
|
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 |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sun Dec 21, 2003 5:37 pm Post subject: Re: two domains and a redirect |
|
|
stitch,
Can you post here the source code of your redirection page? _________________ Support Team
Aprelium - http://www.aprelium.com |
|
Back to top |
|
|
stitch -
Joined: 09 Nov 2003 Posts: 49 Location: washington state
|
Posted: Sun Dec 21, 2003 5:43 pm Post subject: |
|
|
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 |
|
|
stitch -
Joined: 09 Nov 2003 Posts: 49 Location: washington state
|
Posted: Fri Jan 02, 2004 10:05 am Post subject: |
|
|
okay, since I never heard anything back I figure its just not going to work... right? |
|
Back to top |
|
|
aprelium -
Joined: 22 Mar 2002 Posts: 6800
|
Posted: Sat Jan 03, 2004 4:39 pm Post subject: |
|
|
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 |
|
|
|