Root Index Header Redirection

  • champkris
  • Beginner
  • Beginner
  • champkris
  • Posts: 39

Post 3+ Months Ago

I host several domain in a single host. With this in mind, I have one index.php at root folder that would detect which domain name has been requested. Then it would perform header redirect to the correct folder of that requested domain name.

I just have a question that if this would affect my SEO?
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • loanskey
  • Newbie
  • Newbie
  • loanskey
  • Posts: 10

Post 3+ Months Ago

yes that will

http://www.phpglobe.com/viewtopic.php?p=116#116
  • champkris
  • Beginner
  • Beginner
  • champkris
  • Posts: 39

Post 3+ Months Ago

How to solve problem then?

here is example of my code

<?php
//echo $_SERVER['HTTP_HOST']."hey";
$a=$_SERVER['HTTP_HOST'];

switch ($a) {
case "webbuildstuff.com":
header("HTTP/1.1 301 Moved Permanently");

header("Location: http://www.webbuildstuff.com/site/index.php");
break;
case "www.webbuildstuff.com":
header("HTTP/1.1 301 Moved Permanently");

header("Location: http://www.webbuildstuff.com/site/index.php");
break;
}

?>

I've heard that.. putting

header("HTTP/1.1 301 Moved Permanently");
before header redirect would not affect the SEO, is it?
  • PuneetJvw
  • Beginner
  • Beginner
  • PuneetJvw
  • Posts: 46
  • Loc: India

Post 3+ Months Ago

I think you are doing it all wrong.

Give each site a seperate identity (index file).

Max what you can do is use a 301 redirect.


Regards/Puneet M.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 5 guests
  • 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 post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.