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  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
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


    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

    - Toggling CSS Properties with the GX JavaScri...
    - Cancel, Queue and Pause Animations with the ...
    - Producing Elastic Effects with the GX JavaSc...
    - Moving Divs Diagonally with the GX JavaScrip...
    - Moving Elements Vertically and Horizontally ...
    - Making Bouncing Effects in Parallel with the...
    - Creating Bouncing Effects with the GX JavaSc...
    - Manipulating Background Colors with the GX J...
    - The GX JS Animation Framework
    - Debug Ajax-Generated Tags in Firefox
    - Building a Page Controller with the jQuery Q...
    - Paginating Database Records with the jQuery ...
    - Paginating Images with the jQuery Quick Pagi...
    - Hiding the Page Counter with the jQuery Quic...
    - Introducing the Quick Pagination jQuery Plug...







    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek