Regex help

From: Date: Wed, 22 Aug 2001 10:23:37 +0000
Subject: Regex help
Groups: php.general 
Request: Send a blank email to php-general+get-63886@lists.php.net to get a copy of this message
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

« previous php.general (#63886) next »