Jump to content

301 redirect in PHP


jing.ling

Recommended Posts

Hi all

 

I just created a php file which is used to 301 redirect to another page. The code  wrote is:

 

<?php
// Permanent redirection
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.google.com/");
exit();
?>

 

But when I check it online with http://www.best-seo-tools.net/301check/Default.aspx, it shows a 302 redirect inseatd of 301

 

Can anyone help me about that?

 

Thanks

Link to comment
https://forums.phpfreaks.com/topic/155771-301-redirect-in-php/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.