JavaScript
  Home arrow JavaScript arrow Server-side redirects: .htaccess versus Me...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Actuate Whitepapers 
Moblin 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
JAVASCRIPT

Server-side redirects: .htaccess versus Meta Redirects
By: Stephen Davies
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 6
    2007-11-28

    Table of Contents:
  • Server-side redirects: .htaccess versus Meta Redirects
  • How .htaccess can help you: Custom Error Pages
  • Password Protection / Authentication
  • Enabling SSI (Server-Side Includes)
  • Redirects
  • Pros and Cons

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT

    Stay one step ahead of the competition. Evaluate and give feedback on some of the hottest web development tools on the market today. Make your opinion heard! Click Here

    Server-side redirects: .htaccess versus Meta Redirects


    (Page 1 of 6 )

    URL redirects are needed for a number of reasons. One example is when you have changed significant portions of your website, and then have to deal with the problem of people finding their way from the old pages to the new pages. There are different ways of redirecting pages, through Meta tag http-equiv, JavaScript or any of the server-side languages. And what’s more, you can do it through .htaccess, which is probably the most effective, considering the minimal amount of work required to do it.

    Introduction to .htaccess

    Firstly, htaccess (Hypertext access) is an Apache HTTP server command file. Also referred to as “distributed configuration files,” it provides a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory. The directives apply to that directory, and all the subdirectories thereof.

    There is a huge range of tasks that .htaccess can handle for web sites including: custom error pages, password protection/authorization for a specific directory, enabling SSI (server-side includes), blocking users by IP, blocking bad bots, changing default directory pages, preventing a directory listing, redirects and adding MIME types.

    The best way to redirect from old or dead links is to use these server-side redirects. Most web servers will allow the use of .htaccess which facilitates this process. It is quite simple to edit and perform a number of tasks.

    The important aspect is not to delay the surfer as they will be impatient. Nobody likes to wait for a page to load and a "Page not available" result will lose the visitor.

    The usual and quickest way before server-side redirects was to add a HTTP refresh. Search engines are not too fond of the code and that page might be removed from the search engine index. That is something that you definitely do not want as a business or freelancer. Usually, this happens if you use a refresh for less than 10 seconds.

    More JavaScript Articles
    More By Stephen Davies


       · .htaccess redirects seem to cause a huge problem in FF2.0 as the browser downloads...
     

    JAVASCRIPT ARTICLES

    - Detect Browser Compatibility with the Reques...
    - Using the EXT JS Date Picker Widget
    - Ajax Hack for Entering Information Without R...
    - EXT JS 2.1 Overview
    - Using the Style Object for Zebra Tables with...
    - Binary Searching
    - An Improved Approach to Building Zebra Tables
    - Assigning Background Colors Dynamically to Z...
    - Building Zebra Tables with CSS and JavaScript
    - JavaScript: Array Objects
    - A Closer Look at Smart Markers with Yahoo! M...
    - Using Polylines and Smart Markers with Yahoo...
    - Bulleted Menu of Links
    - Creating Click Loggers and Basic Markers wit...
    - Adding Pan Controls to Yahoo! Maps







    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway