Php redirection is the easiest way of setting up a redirection on a page that no longer exists or taking users to a page that you want them to view when they go to a certain page.

The things that must be given importance while PHP redirecting are browser compatibility and compactness of the code itself.

<?php

header( ‘Location: http://www.yoursite.com/new_page.html’ ) ;

?>

Change the code on the redirect page to be simply this. You need to replace the URL above with the URL you wish to direct to.

Be sure that you do not have any text sent to the browser before this, or it will not work. Your safest bet is to simply remove all content from the page but the redirect code

Tags: , , , ,