linux poison RSS
linux poison Email

301 Redirects using apache

301 redirect is the safest search engine redirect. This is also the friendliest method for web page redirection. Most web hosting company and web master out there will definitely recommend this method of web page redirection. The code “301 is interpreted as “moved permanently”.

For websites hosted in either dedicated server or a shared web hosting server, you use 301 redirects in redirecting a single html page or an entire website.

Here’s and example of redirecting a single page/html page:
Redirect 301 /oldpage.html http://www.example.com/newpage.html
For a whole website, you can use 301 redirect in this manner:
Redirect 301 / http://www.example.com/
There are other use of the 301 redirect on a web sites. Here are other use of it:

Changed file extension
Redirect web site with ‘www’ to not having one.
vice versa of the previous example.
Redirect example.com/index.php to example.com/

So next time you moved your web site content from one web hosting server provider to another or moving your site to a new domain name, you can definitely use the 301 redirect.

This is simple configuration you can make it into your Apache configuration file.

[ref: http://www.sysadmindayph.com/blog/301-redirects-htaccess/]


1 comments:

yogesh said...

Good one really was very helpful to freshers like me

Also i use 301 redirect checker to confirm the same.

Post a Comment

Related Posts with Thumbnails