• Resolved prsc

    (@presscat2015)


    Hi Team,

    Can we configure Wordfence to block http/https requests to specific files or folders? I would like it to block some dev related files such as .git, .gitignore, etc for better security.

    Thanks in advance!

Viewing 1 replies (of 1 total)
  • Hey @presscat2015,

    Unfortunately, this isn’t currently supported. However, this can be done using a bit of custom code in the .htaccess file. The code below is an example of what this would look like. Of course, you’d want to adjust the path with the file name you’re trying to block access to.

    # Protect log.txt
    <Files ./inscription/log.txt>
    Order Allow,Deny
    Deny from all
    </Files>

    Please let us know if anything else comes up.

    Thanks,

    Gerroald

Viewing 1 replies (of 1 total)
  • The topic ‘Can we block requests to specific files?’ is closed to new replies.