Hello all

In the Apache config file, we have the following directive:

SetEnvIfNoCase Referer "^http://www.oursite.com/"; local_ref=1

<FilesMatch ".(gif|jpg)">
  Order Allow,Deny
  Allow from env=local_ref
</FilesMatch>

We use this to prevent people from directly linking to .gif and .jpg files. 
This technique is covered here:

http://apachetoday.com/mailprint.php3?action=pv&ltsn=2000-06-14-002-01-PS

However, we have to add more and more file types to the FilesMatch 
directive. Currently it looks like this:

<FilesMatch ".(doc|zip|xls|exe|jpg|gif|png|psd|tif|tif)">

However, this list continues to grow. And we can never be sure that every 
file type is included.

It occurred to me that it would be better to say "do not serve any files 
except .htm, .html and .php files.".

I have spent quite a long time with several regexes, but I am unable to 
create a regex that archives this seemingly simple talk.

If anyone could help, I would be really happy….

S


_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to