Jenny Huang’s Blog

Online Marketing Professional

 

How to redirect a web page, the smart way

 

Article: How to redirect a web page, the smart way

Author: Steven Hargrove

Posted: April 2006 | Steven Hargrove’s Blog

Full article: http://www.stevenhargrove.com/redirect-web-pages/

Summary: Steven not only outlines the importance of having a redirect file but lays out easy to follow steps of how to implement redirect files for all types of code including HTML, IIS, ColdFusion, ASP, PHP, ASP .Net, JSP/JAVA, etc. Steven also explains the value of using a 301 Redirect Using Mod_Rewrite for SEO purposes. Without the 301 Redirect Mod_Rewrite, Google may evalute www.yoursite.com and yoursite.com as two separate entities with two separate page ranks. Hence, the importance of a 301 Redirect Mod_Rewrite.   

Breakdown:

  1. Create a file on the root directory of your website, name it “.htaccess”.
  2. Open the .htaccess file using notepad or what ever text editor that you prefer.
  3. Add this into the .htaccess file, save it and then upload it to your web server:
             RewriteEngine On
             rewritecond %
{http_host} ^yoursite.com
             rewriteRule ^
(.*) http://www.yoursite.com/$1 [R=301,L]
These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • Reddit
  • Facebook
  • GoogleBookmarks
  • Technorati
  • blogmarks
  • co.mments
  • BlinkList
  • NewsVine
  • StumbleUpon
 

No Responses to “How to redirect a web page, the smart way”

 

Leave a Reply