Next Spaceship

Driving into future...

How to Redirect to a New Page

| Comments

This is an example that shows how to redirect (forward) to a new page in PHP.

php PHP Redirect Code <?php header("HTTP/1.1 301 Moved Permanently"); header("Location: http://leons.im/about/"); ?>

Note that with 301 error No., instead of 302 error No., your page is Search Engine Optimized, ie the search engine can retain the original page rank for your new page.

Comments