ComputersLinuxWeb Design

Apache mod_rewrite

The Apache mod_rewrite module is a very powerful tool to allow you to manipulate URL’s before the server decides what action to carry out, or what html file to send in reply. If you’ve ever wanted to be able to offer different URL’s for the same file, or even direct to a different website all together then mod_rewrite can help. It offers more functionality than the mod_alias module which can be used to perform some basic mapping between URL’s and filenames. The problem that I have found is that whilst the documentation available explains what can be achieved it is a bit too complex when you just want to carry out some basic operations. This is therefore a guide for mod_rewrite for people that just want to get some quick rules up and working to improve their site.

I’ve found it really useful now that I’ve actually got it working on my website so I’ve created a basic guide to give an introduction to using mod_rewrite on Apache. This is tested with Mandrake Linux, but should work on most UNIX or even windows.

Here is a simple guide to the Apache mod_rewrite module.