PHP header redirect
PHP redirect from page to URL. PHP 301 redirect.
This PHP redirection should return HTTP response status code: 301 Moved Permanently.
Search engines use the 301 response status code to transfer the page rank from the old URL to the new URL.
PHP header redirect
Replace old-page.php code with redirection code to new-page.php.
old-page.php:
<?php
// PHP permanent URL redirection
header("Location: http://www.domain.com/new-page.php", true, 301);
exit();
?>
The old page must have .php file extension.
The new page can be with any extension.
<?php
// PHP permanent URL redirection
header("Location: http://cloudhostingus.com", true, 301);
exit();
?>
Comments
Post a Comment