...

View Full Version : rewrite little fix ?



Anthony2oo4
08-25-2006, 04: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:

File/billing.zip.html

and it will go to a directory called

uploadedfileshere/billing.zip

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?


Thanks

Sayonara
08-26-2006, 12: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.

Anthony2oo4
08-26-2006, 02: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:

http://temp.platinumhost.co.uk/rewrite/File/billing.zip.html

Thanks for your time.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum