Categorized | Tips and Trick

Easy to make redirect your webpage or blog

redirection web blog1. Redirection from old domain to New domain using .htaccess

Create code below and rename it as .htaccess and placed in your root directory into your old web or blog. Please replace www.yourdomainname.com with your new domain you want make redirect. This method of redirection works on Linux servers having the Apache Mod-Rewrite moduled enabled.

Options +FollowSymLinks
RewriteEngine on
RewriteRule (.*) http://www.yourdomainname.com/$1 [R=301,L]

2. Redirect from non www to www

Create a .htaccess file and placed in the root directory of your old web or blog. Please REPLACE yourdomainname.com and www.yournewdomainname.com with new domain name you want to make redirect. Works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.

Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^yourdomainname.com [nc]
rewriterule ^(.*)$ http://www.yourdomainname.com/$1 [r=301,nc]

3. Redirection using index.html

You can use this code before </head> . Copy and rename it as index.html and replace yourdomainname where you want make redirection. For your information you can change number 5 to 4 or 3 or 2 that mean how many seconds you want automatically redirect to your new webpage or blog.

<meta http-equiv="Refresh" content="5; URL=http://yourdomainname.com" />

Read also:


1 Comments For This Post

  1. Rick Lim says:

    Thanks for this tutorial. I had been wondering how to do that but now i know.

Leave a Reply

auctions store cheap items
Advertise Here
Advertise Here

Small Donation

Friends