I am trying to stop direct access to a subdirectories and the php files within subdirectories. I\'ve added the following code below to the .htaccess file within the subdirec
You can use mod_rewrite to restrict access to all bet certain files in a directory. Add this to the .htaccess in that directory.
.htaccess
RewriteEngine On RewriteCond %{REQUEST_FILENAME} !(jsonp)|(ws)|(ajax) RewriteRule .* - [R=404,L]
Just replace the jsonp ws ajax with the name of your files.