How to Do a PHP Redirect With Blogger

Use the redirect process to direct users from your old Blogger blog to a new location when you change to a different domain or hosting account. You must edit the "index.php" file on your Blogger account to redirect traffic. You can redirect users to a new domain, a different directory on the same blog account or a new home page.

Instructions

    • 1

      Open a Web browser and log in to your Blogger Web host account. Each Web host has its own administration console, so you must use the proprietary Web host interface. Open the "index.php" file in the root directory.

    • 2

      Add the PHP redirect header. The following code tells the server to redirect users:

      header("HTTP/1.1 301 Moved Permanently");

    • 3

      Add the line of code that tells the server where to redirect your visitors. For instance, the following code redirects a Blogger visitor to "domain.com/homepage.php":

      header("Location: domain.com/homepage.php");

    • 4

      Save the changes and close the PHP editor. Open a separate Web browser tab and navigate to the Blogger domain to test the new redirect.

Related Searches:

References

Comments

Related Ads

Featured