301 Redirect "How To"

liunx

Guest
Hey, one of the sites I work on has recently purchased the .net and .org domains to go along with the .com. I was wondering if someone could explain to me how to setup a 301 redirect for the two new domains, I do have hosting for each.<br />
<br />
Thanks.<br />
<br />
PS.<br />
Not sure if this was the right place to post this... It really has nothing to do with html layout but I saw no where else that seemed to fit.<!--content-->it'll do fine here, i've posted about how to do a 301 redirect several times, try a search ;)<!--content-->Originally posted by leoo24 <br />
it'll do fine here, i've posted about how to do a 301 redirect several times, try a search ;) <br />
<br />
Sorry, I always do a search first, always have. It was just going really slow for some reason. I'll try a search tomorrow when I get up. At least I know it should be there lol.<br />
<br />
Thanks.<!--content-->maybe your connection is slow at the moment, a search works fine from my end, but no worries, here you go:rename your <br />
<br />
index.html to index.php and paste only this into it:<br />
<br />
<?php <br />
<br />
header("HTTP/1.1 301 Moved Permanently"); <br />
header("Location: <!-- m --><a class="postlink" href="http://www.newdomain.com/page.html">http://www.newdomain.com/page.html</a><!-- m -->"); <br />
exit(); <br />
<br />
?><!--content-->
 
Back
Top