Hi guys I would like to know the code to perform a 301 redirect on my site to another site? I have a Hosting Linux
Thanks

Hi guys I would like to know the code to perform a 301 redirect on my site to another site? I have a Hosting Linux
Thanks
put this in index.php
Or put this in .htaccess file (this will redirect all urls):PHP Code:<?php
header('Location: http://www.example.com/');
?>
Next time use google to find a solutionCode:RewriteEngine on RewriteCond %{HTTP_HOST} ^([^.:]+\.)*oldsite\.com\.?(:[0-9]*)?$ [NC] RewriteRule ^(.*)$ http://newsite.com/$1 [R=301,L]
Last edited by paincake; 12-28-2011 at 05:18 PM.

Thanks for the reply sorry but I must make a redirect from a subdomain (name.domain.com) to a external domain (site.com) the code in .htaccess file is the same?
because don't work....

any ideas?
Bookmarks