[Defender Pro] Defender's "Prevent Information Disclosure" acts as if I don't

I already have an .htaccess file. Why does it offer to create one for me?

We can automatically add an .htaccess file to your root folder to action this fix.

Screenshot: https://share.getcloudapp.com/12uyAvgm

  • Nithin Ramdas
    • Support Wizard

    Hi Clifford P ,

    Seems like that’s a typo, I’ll make sure to bring that into our team’s attention to fix in the next release. What you have highlighted doesn’t create a .htaccess file, it’ll only update the existing .htaccess file with the following rules:

    ## WP Defender - Prevent information disclosure ##
    
    <FilesMatch "\.(md|exe|sh|bak|inc|pot|po|mo|log|sql)$">
    Require all denied
    </FilesMatch>
    
    <Files robots.txt>
    Require all granted
    </Files>
    
    <Files ads.txt>
    Require all granted
    </Files>
    
    ## WP Defender - End ##

    You can either click the “Update .htaccess file” button in Defender or manually add the above rules to .htaccess file it should work the same.

    I hope it’s clear. Please do let us know if you have any further query.

    Kind Regards,
    Nithin