View Full Version : rewrite little fix ?

08-25-2006, 05:59 PM
hey im just starting to learn about mod_rewrite and so far i came up with this:

Options +FollowSymLinks
RewriteEngine on
RewriteRule File/(.*).html$ uploadedfileshere/$1

I want to be able to enter:


and it will go to a directory called


which it does do, but when downloading billing.zip, it seems to be called billing.zip.html. How can I tell the code that I dont want the .html part to be added?


08-26-2006, 01:05 AM
The first thing I notice is that the period in .html$ ought to be escaped with a backslash, like this:

RewriteRule File/(.*)\.html$ uploadedfileshere/$1

See if that makes any difference.

[edit] OK... so the backslash does not seem to appear on the page. It should be positioned between the closing bracket and the period. Press "quote" to see it.

08-26-2006, 03:01 PM
Thanks for the reply, didnt think I was going to get one.

I pressed quote and copied the code you wrote but i think I already tried that; but ethierway it didnt work. You can try yourself here:


Thanks for your time.