Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 423

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/session/session.php on line 426

Warning: Cannot modify header information - headers already sent by (output started at /home/content/f/e/r/ferasferas1/html/scriptslibrary/libraries/joomla/database/database.php:2) in /home/content/f/e/r/ferasferas1/html/scriptslibrary/templates/ja_purity/ja_templatetools.php on line 49
Google Safe 301 Redirect Using PHP - The Scripts Library Community

Free Programming Tutorials & Source Code

 
  • Increase font size
  • Default font size
  • Decrease font size
Home PHP Google Safe 301 Redirect Using PHP

Google Safe 301 Redirect Using PHP

E-mail
(0 votes, average: 0 out of 5)

When you want to redirect, make sure you are doing it in the right way. Google penalizes websites that being redirected to many other locations. Many webmasters tries to cheat on Google by redirecting good optimized pages or website to bad ones However, the following method a safe for Google redirection, as well as all search engines behind. Put the following code into the page you want it to redirect to another:
 
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.newdomain.com/newurl.htm");
exit();

That's it!