Home » Htaccess Tools » Questions regarding htaccess » blocking external access to a folder
blocking external access to a folder [message #873] Wed, 30 January 2008 12:27
kaliok  is currently offline kaliok
Messages: 1
Registered: January 2008
I am trying to block access to a particular folder that contains some javascripts files, these are used internally by a cms, but I want to stop the javascript files from being accessed by external sites that use an absolute url to gain access. I have used the following code but it doesn't seem to be working:

RewriteEngine on
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?mytestsite.com/.*$ [NC]
RewriteRule \.(js)$ - [F]

I have placed this in the cms folder that contains the folder in which the javascript files are located.

Thanks for any help in advance.

Read Message
Previous Topic:htaccess Banning by Browser Type
Next Topic:reveal directory using .htaccess -how?
Goto Forum:

  


Current Time: Sat May 17 04:55:20 CEST 2008

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software