Viewing 2 replies - 1 through 2 (of 2 total)
  • Totally! But you’ll need to remember that there are a bunch of extra mod_rewrite rules in that .htaccess file, so you might not want to use that file unless it’s for a specific purpose.

    Alternatively, if you’re just wanting to block all access to a directory try adding a .htaccess file with just this in it:

    deny from all

    Thread Starter kimsolga

    (@kimsolga)

    Had problems with deny from all

    what seems to work in .htaccess in other directories to allow my website to access image files but to deny access for all others

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?MYSITEURL [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ – [NC,F,L]

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘restricting other directories’ is closed to new replies.