Home arrow JavaScript arrow Server-side redirects: .htaccess versus Meta Redirects
JAVASCRIPT

Server-side redirects: .htaccess versus Meta Redirects


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.

Author Info:
By: Stephen Davies
Rating: 5 stars5 stars5 stars5 stars5 stars / 7
November 28, 2007
TABLE OF CONTENTS:
  1. · Server-side redirects: .htaccess versus Meta Redirects
  2. · How .htaccess can help you: Custom Error Pages
  3. · Password Protection / Authentication
  4. · Enabling SSI (Server-Side Includes)
  5. · Redirects
  6. · Pros and Cons

print this article
SEARCH DEVARTICLES

TOOLS YOU CAN USE

advertisement
Server-side redirects: .htaccess versus Meta Redirects
(Page 1 of 6 )

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.


blog comments powered by Disqus
JAVASCRIPT ARTICLES

- More Top jQuery Plugins for Menus
- Top jQuery Tutorials for Beginners
- New UI Framework and SDK for JavaScript Rele...
- JavaScript OpenPGP Tool, Node.js 0.6.3 Avail...
- Yahoo Releases Cocktails Language and Develo...
- Customizing jQuery Slideshows: Dynamic Contr...
- Customizing jQuery Slideshows: the animate()...
- Customizing jQuery Slideshows: slideUp() and...
- Customizing jQuery Slideshows: hide() and sh...
- Web Workers: Performing Calculations in Para...
- More Top JavaScript Frameworks and Libraries
- More Dynamic jQuery Styling Techniques
- The Top JavaScript Libraries
- The Top JavaScript Frameworks
- Dynamic jQuery Styling

Dev Articles Forums 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Weekly Newsletter
 
Developer Updates  
Free Website Content 
Contact Us 
Site Map 
Privacy Policy 
Support 



© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 11 - Follow our Sitemap
Popular Web Development Topics
All Web Development Tutorials