Skip to content

How to make a redirect in PHP

  • by

Greetings everyone, Today our topic redirect in PHP. In this article we will learn how to redirect from the home page to the about page in PHP so, let’s go started.

If you want to go another page you can easily use header() this is a built-in function of PHP  which do use to send the raw HTTP  header to the users.

HTTP stands for (HyperText Transfer Protocol) now I want to go home page to the about page I use to URL will go to another page see the example below.





Now I reached at the so, redirect the user from chrome to home page on perpetual base and then it also mentions the HTTP response code into header( ) function such as seen in the example below.

The SEO Stands for Search Engine Optimization throw  “page rank” from the home page to the about page.


// 301 Moved Permanently

header("Location:", true, 301);

exit( );


Read more: header() Function in PHP


Leave a Reply

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