seo_sensey
Jul 24th 2004, 8:09 pm
Hi!
First of all I want to say I found your forum when I signed up for the Keyword Tracking tool and after reading a few threads ( which seemed to be very informative regarding the subjects that were debated ) I decided to join.
Now, I'm a php newbie, just started a few weeks ago but I can't solve this problem at this moment. Here is my problem:
Recently I noticed some issues for one of my sites' pages listed in Yahoo! index. I have a hosting account where is host 2 domains, 1 is an addon domain and points to a subdomain of the main domain of the account.
Something like this: main domain of the account is domain.com and the second domain ( domain2.com ) points to sd.domain.com.
Now the problem is that I have many directories for domain2.com which in order to work properly need an ending "/" ( like: www*domain2*com/directory/ not www*domain2*.com/directory ) which Yahoo! picked up without the ending "/" and shows them in the serps without it like: www*domain2*.com/directory , and when surfers click on it they get and error page . I see no problem with Google which picked them with the ending "/" .
I asked the same question on SEOCHAT and a nice member gave me a solution, something like this:
<?
$requested_domain = $_SERVER['SERVER_NAME'];
$requested_page = $_SERVER['REQUEST_URI'];
if ($requested_domain == "subdomain.maindomain.com") {
header("Location: http://www.addondomain.com/".$requested_page);
}
?>
but at that moment I didn't pay to much attention because I though it will work ( my bad mistake :( )
Now, it seems it doesn't so if anyone can give me a clue on this I would be very thankful.
Thank you!
First of all I want to say I found your forum when I signed up for the Keyword Tracking tool and after reading a few threads ( which seemed to be very informative regarding the subjects that were debated ) I decided to join.
Now, I'm a php newbie, just started a few weeks ago but I can't solve this problem at this moment. Here is my problem:
Recently I noticed some issues for one of my sites' pages listed in Yahoo! index. I have a hosting account where is host 2 domains, 1 is an addon domain and points to a subdomain of the main domain of the account.
Something like this: main domain of the account is domain.com and the second domain ( domain2.com ) points to sd.domain.com.
Now the problem is that I have many directories for domain2.com which in order to work properly need an ending "/" ( like: www*domain2*com/directory/ not www*domain2*.com/directory ) which Yahoo! picked up without the ending "/" and shows them in the serps without it like: www*domain2*.com/directory , and when surfers click on it they get and error page . I see no problem with Google which picked them with the ending "/" .
I asked the same question on SEOCHAT and a nice member gave me a solution, something like this:
<?
$requested_domain = $_SERVER['SERVER_NAME'];
$requested_page = $_SERVER['REQUEST_URI'];
if ($requested_domain == "subdomain.maindomain.com") {
header("Location: http://www.addondomain.com/".$requested_page);
}
?>
but at that moment I didn't pay to much attention because I though it will work ( my bad mistake :( )
Now, it seems it doesn't so if anyone can give me a clue on this I would be very thankful.
Thank you!