Filed in archive
SEO
by noel on May 10, 2006

This one is contributed by a friend of mine Benj of actiononline.biz
This is a 301 redirect using PHP program.
<?
$_SERVER[HTTP_HOST] = strtolower($_SERVER[HTTP_HOST]);
if($_SERVER[HTTP_HOST]=="actiononline.biz" or
$_SERVER[REQUEST_URI]=="/index.php") {
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.actiononline.biz");
exit();
}
?>
Permalink: 301 redirect using PHP
Trackback: http://publish.creative-weblogging.com/publish/mt-tb.pl/21780
Mr Wong
Vote for 301 redirect using PHP:
|
Rating: 9.20 out of 5 vote(s) cast.
|
Response from:
Indie Music
(05/11/06 9:34am)
Response from:
Matt
(03/30/07 3:40pm)
RedPHP.com has a similar script to this already setup, with more features:
www.redphp.com/makeitwww/
www.redphp.com/makeitwww/
Subscribe
Use the search to look for other interesting posts
| RSS | See all blog subscribe options |
|
What is RSS? | |
| Yahoo! |
|
| Addthis |
|
| Bloglines |
|
| Newsletter | |
| Follow us on Twitter! |







RewriteCond %{HTTP_HOST} ^www\.example\.com/index.php$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1
[R=301,L]