Friday 15 June 2012

apache - Don't allow direct access to files in a certain subdirectory -


I have tried many different things in my .htaccess folder and I'm in the brain and trying to do this work I am here.

I have a subdirectory that includes an .htaccess file. I do not like files (images, CSS, JS and likes) directly in this folder, though they are notified of www.domain.com/foo/page- Name only

site only requires access / link I have tried the following (not all but one at a time):

  order Deny all, Allow all to deny 127.0.0.1 :: 1 localhost revittinine on rewritecund% {HTTP_REFERER}! ^ Http: // (www \.)? Domain.com/foo/ * $ [nc] rewritable. *. (GIF | PGG | JPG | Dock | Xls | PDF | MP3 | MOP | JS) $ http://domain.com/ [NC] 301 / TopSecure Redirect http: // www .domain.com /  

Is my problem occurring in the .htaccess file in a subdirectory? This is the only directory I need to restrict access to, so I do not see any reason to keep it in the root. My knowledge of .htaccess is quite limited. I know that the HTTP Referrer is insecure but this is the best option as I can do it.


No comments:

Post a Comment