301 permanent redirection of website


 
If you want to redirect your http://YOUR-DOMAIN.in/ URL into browser than you have to add below script code in your htaccess file.

it will be redirected to http://www.YOUR-DOMAIN.in/

#RewriteCond %{HTTP_HOST} !^www\.
#RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/ [R=301,L]

If anyone tried to open http://YOUR-DOMAIN.in/ URL into browser than it will be redirected to http://www.YOUR-DOMAIN.in/
If anybody want to add wwww in your URL then you have to add below code in your htaccess file.

Advertisements

One thought on “301 permanent redirection of website

  1. Pingback: WordPress Plug-in 301 Redirect: Perfect to Improve Blog Link Popularity | shameem

Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s