For Linux and Shell scripting.

Domain redirection using PHP script


If you want to redirect a domain to some other url, you can use the PHP script below.


So, when you take or it will be redirected to “;.


3 thoughts on “Domain redirection using PHP script

  1. or u can just use a simple javascript code..

  2. in which index page , i will include this php code.

    Destination domain index or redirecting domain index??
    In this case no need for .htaccess??

    My destination domain is ,
    I want to redirect to

    Please guide me for the above…

  3. Nice tutorial….thanks for this post…..

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s