Hi X-perts,
I need to protect a few directories from direct http requests. Currently, I have the following .htaccess file in those directories:
<Files *.php>
Order Deny,Allow
Deny from all
</Files>
It prevents from executing any php or asp files, but not from viewing .css or .js files. How can I protect those directories from viewing files?
I tried also:
RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^
http://(www\.)?mydomain.com/.*$ [NC]
RewriteRule \.(gif|jpg|js|css)$ - [F]
<Files *.php,*.css,*.js>
Order Deny,Allow
Deny from all
</Files>
But it does not work.
Please, advise.
Thanks
Andy