← Back to Blog

301 .htaccess Redirect

Sep 15, 2006 1 Comment

After the implementation of WordPress, some of the URLs and paths on this site have changed. To prevent getting 404 File Not Found error (traffic coming from links, bookmarks and search engines), I use .htaccess 301 redirect. Htaccess redirect is better than the meta refresh or redirect tag because there is no delay as the browser reads the .htaccess file first. Here is how it works.

Go to your site’s root folder, download the .htaccess file to your local computer and edit it with a plain-text editor (ie. Notepad). If you are using FTP Client software and you don’t see any .htaccess file on your server, double check your setting and make sure you have turn on invisible / system files.

To Redirect Certain Page(s):

Redirect 301 /oldpage.html http://www.yoursite.com/newpage.html Redirect 301 /oldpage2.html http://www.yoursite.com/folder/

To Redirect Entire Site:

Redirect 301 / http://www.new-site.com/

Trendy Omni Beanbag

Collapse All Expand All

One Comment… +add your?

  1. Feb 03, 2010 7:12 am

    Muzika

    Very useful tutorial, but maybe you could add more methods for 301 redirect …

Write Your Comments

Reply in this thread

  • No rude or spam comments
  • Allowed HTML tags:
    blockquote, a, em, strong, strike
  • Use HTML entities to output code as text
    (ie. < = &lt; > = &gt;)