PHP redirect

Modified on Wed, 29 Jun 2016 at 02:36 PM

 Overview: you have PHP hosting and want to redirect all traffic to another website.


  • Create a text file and paste in the following content:

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

     

  • Save the file as index.php
  • Upload the file using FTP to your existing PHP website
  • Ensure that any existing DNS zone records for WWW, @ and * point to your existing PHP website


Any traffic hitting your existing PHP website will be forwarded to the new website

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article