First turn your ReWriteEngine On. This can be done in the particular folder to allow them access to only the one file. You need to understand the conditions of mod_rewrite read below. http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html OR you can just use the http://cooletips.de/htaccess/ from Germany. It will take you through step by step in creating an htaccess. I might suggest you do not use the password options because that to me is not safe to use someone else's website when creating htaccess screen names and passwords. Richard L. Buskirk -----Original Message----- From: Al [mailto:news@xxxxxxxxxxxxx] Sent: Monday, May 23, 2011 11:53 AM To: php-general@xxxxxxxxxxxxx Subject: htaccess question How can I prevent access to all files in a directory except one with an htaccess file. I've tried several approaches found with Googling; but, none seem to work. e.g., <FilesMatch "^(makeScodeImg.php)"> Order Allow,Deny Deny from all </FilesMatch> This seems to me as it should deny to all except makeScodeImg.php Thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php