How to redirect using PHP

Sometimes you want an url to be directed to another location. As php is the major webbuilding language, here’s howto redirect with PHP.

1 Create an index.php file with the following content:

< ? Header( "HTTP/1.1 301 Moved Permanently" ); Header( "Location:" ); ?>

2 Save it on the location that needs to be redirected to the new location.

Please follow and like us:

By Leendert

Leendert van Achteren is a Business Analyst and part-time Web Entrepreneur. He's building and managing websites with SEO in mind He's writing about anything that has his interest, but especially focusing on market transparency for consumers.

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.