View Single Post
Old 02-14-2002, 03:28 AM  
AdultWire
Confirmed User
 
Join Date: Feb 2002
Location: Toronto, ON
Posts: 962
Can anyone help me with this rewrite rule?

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !^.*\.html$ [NC]
RewriteCond %{REQUEST_FILENAME} !^.*\.htm$ [NC]
RewriteCond %{REQUEST_FILENAME} !^.*\.jpg$ [NC]
RewriteCond %{REQUEST_FILENAME} !^.*\.jpeg$ [NC]
RewriteCond %{REQUEST_FILENAME} !^.*\.gif$ [NC]
RewriteCond %{REQUEST_FILENAME} !^.*\.png$ [NC]
RewriteCond %{REQUEST_FILENAME} !^.*\.swf$ [NC]
RewriteRule ^.*$ - [F]

This works fine, except when you try to get a directory index without specifying a filename. So I tried adding:

RewriteCond %{REQUEST_FILENAME} !^$ [NC]

as part of the rule, but to no avail -- I still get a forbidden on directory indexes unless I specify the filename.
__________________
SIG TOO BIG! Maximum 120x60 button and no more than 3 text lines of DEFAULT SIZE and COLOR. Unless your sig is for a GFY top banner sponsor, then you may use a 624x80 instead of a 120x60.
AdultWire is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote