cgm225 Posted February 19, 2008 Share Posted February 19, 2008 I have the following directory structure --ROOT ----includes ------php ------.htaccess ---------gallery ---------galleryFileCalledByJavaApp.php I want to deny all for all the php files in the includes/php directory with an htaccess file at that level, except for one php file in a subdirectory that is called by a Java upload application. Any ideas? Thank you all in advance Quote Link to comment https://forums.phpfreaks.com/topic/91987-htaccess-protection-on-all-files-but-one/ Share on other sites More sharing options...
wildteen88 Posted February 20, 2008 Share Posted February 20, 2008 You'll want to use the following configuration for the .htaccess file: Deny from all # deny access to includes/php # allow access to includes/php/galleryFileCalledByJavaApp.php only. <Files "galleryFileCalledByJavaApp.php"> Allow from all </Files> Quote Link to comment https://forums.phpfreaks.com/topic/91987-htaccess-protection-on-all-files-but-one/#findComment-471951 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.