howto: Server - deny access to directory v 12 oct 2020
Deny access through browser, web clients, search engines, etc.
Won't affect accessing/including through filesystem
(php includes, etc)
will block link stylesheet, etc.
.......................................................
From main .htaccess file (in document root):
#-- This Doesn't block access:
Order allow,deny
Deny from all
Satisfy All
#-- This gets server error (500):
Order allow,deny
Deny from all
Satisfy All
#-- This works.
#-- blocks access to directory and all files in it:
RedirectMatch 403 ^/lib/.*$
#-- blocks access to directory only:
RedirectMatch 403 ^/lib$
.......................................................
From .htaccess file in the directory:
#-- This works.
Deny from all
_______________________________________________________
begin 12 oct 2020
-- 0 --