So I have this one folder that stores all the confidential php files in it. I dont want people to be able to link/access to it directly, but I have a link on my web site that makes use of the PHP files. This is what I have so far
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?mysite.com/.*$ [NC]
RewriteRule ^.*$ http://mysitenet/ [R=301,L]
But for some reason it does not work. Can someone help me on this?