PHP Redirect

a post by Alec, filed in Computer, Websites, how to, html, internet on January 17th, 2008. Read the full post »

PHP redirects are better than Javascript redirects because it is done server side and there is no possibility of the user having JS turned off and not being redirected. The down side is that you need PHP on your server.

It is quite simple:

<?php
header( 'Location: http://www.yoursite.com/new_page.php' ) ;
?>

Just make sure you put it before the doctype and the <html> tag.

Tags: , ,
You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.
  1. The Cipher: Blog » Blog Archive » Javascript Redirect January 17, 2008

    [...] address can be relative or absolute. People may have Javascript turned off, so I find a PHP redirect much better. Tags: delay, instant, javascript, redirect, [...]

Post a Comment »








Safari hates me

Comment Guidelines

  • Hyperlinks are automatically generated.
  • <em>italic</em>
  • <strong>bold</strong>