Set 301 Redirection using .htaccess File

Set 301 Redirection using .htaccess File

There area so many ways accessible victimisation .htaccess file to send user from one page to a different. 301 is one in all the sort to send user from one page to a different.

301 Redirection conjointly called Permenant Redirection.
In this article we’ll see the way to created the 301 redirection from .htaccess file. 301 redirection are often setup in 2 alternative ways. we’ll see each the ways in which up here.

Unlike traditional rewrite 301 redirection can modification the computer address in address bar.

Redirect specific Page victimisation 301

If we wish to send just some of the pages to be redirected to different page victimisation 301 redirection then we’d like to visualize following ways.

Method :: 1

Redirect 301 /oldpage.html 

Method :: 2

RewriteRule ^oldpage.html$  [R=301]

Redirect Whole Site Using 301 redirection

If we have to moving new a website and we want all over visitor of old site being redirected to a new site, then here is the following code for us.

Method :: 1

Redirect 301 / http://www.onlinecode.org/

Method :: 2

RewriteRule ^(.*)$ http://www.onlinecode.org/$1 [R=301,L]

Leave a Comment

Your email address will not be published. Required fields are marked *

9  +  1  =  

We're accepting well-written guest posts and this is a great opportunity to collaborate : Contact US