I have recently been playing with mod_rewriting my web application URLs. I find that they worked perfectly on my live host but just wouldn't work on localhost.

This solution works for me: You have to open the httpd.conf Apache configuration file.

Locate this line and remove the "#":

 #LoadModule rewritemodule modules/modrewrite.so
 

Finally search the file for "AllowOverride None".

This phrase will appear 7 times in the file, you want the second one and change the "None" to "All".

The comment above the line is:

# AllowOverride controls what directives may be placed in .htaccess files.

It can be "All", "None", or any combination of the keywords:

Options FileInfo AuthConfig Limit

# AllowOverride All