Return to UOCC HomeComputing News Home
Header bar

Web Authors: Put .htaccess to Work For You

By Jon Miyake (miyake@darkwing.uoregon.edu)

If you're a web author, you'll probably want to add .htaccess to your toolkit. .htaccess is a tool that gives you the means to personalize your web site. With .htaccess, you can control access to your site, define error messages and MIME-types (content-types) of files, redirect browser requests--and much more.

While standard system definitions cover most of a web author's requirements, there are times when they're not sufficient--and that's when .htaccess can be especially useful. For example, suppose you want to put a file on your web site for users to download. If this file has a unique file extension (i.e., an extension not recognized by the system configuration), it will download as indecipherable visual "garbage." To fix this, you can use .htaccess to properly define the MIME-type for that unique file extension.

.htaccess is also useful for defining error message files that are specific to your web site. Whereas the default error messages returned by the local web server merely provide a generic response indicating that a problem was encountered with a requested file, .htaccess allows you to generate much more useful information. With .htaccess, you can create detailed, site-specific error messages and even provide a means for users to send you feedback about dead links.

If you're interested in learning how to use .htaccess, see the tutorial at http://cc.uoregon.edu/consult/htaccess/


Spring 2000 Computing News | Computing Center Home Page