• Resolved hungrycactus

    (@hungrycactus)


    Hi — I am wondering if I can tell ninjafirewall WP to ignore a specific folder? Reason is my wordpress is on my root folder, but I have other non-WP tools I use in subfolders. Ninjafirewall prevents these other tools from working, so I was hoping I could just tell Ninjafirewall to ignore specific sub folders.

    (Specifically I am using Nextcloud in a subfolder, and I can’t log in when Ninjafirewall is turned on)

    Is that possible? Thanks!

    • This topic was modified 6 years, 5 months ago by hungrycactus.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Hi

    You can use the .htninja script to whitelist the folder:

    <?php
    /*
     +===================================================================+
     | NinjaFirewall optional configuration file                         |
     |                                                                   |
     | See: https://nintechnet.com/ninjafirewall/wp-edition/help/?htninja|
     +===================================================================+
    */
    if ( strpos( $_SERVER['SCRIPT_NAME'], '/SOME_FOLDER/') !== FALSE ) {
       return 'ALLOW';
    }
    

    Replace SOME_FOLDER with the folder name.

    Thread Starter hungrycactus

    (@hungrycactus)

    Awesome! Thanks so much! It works like a charm!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘ignore specific folder?’ is closed to new replies.