HTTP 301 Redirect using PHP

You can use PHP header() function to do redirect.

To do 301 redirect, use

For 302 redirect, use

If you need to redirect a site to new site keeping same URL structure, you can use

Add a Comment

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