• Resolved rstackj

    (@rstackj)


    Hey guys,

    I figured that the stuff ninjafirewall adds to the .htaccess file blocks me from saving my settings in Rank Math. When trying to save settings (under general tab only) i get redirected to the 404 page.

    When I remove the following entries from htaccess

    # BEGIN Security Block
    # Block the include-only files.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]
    </IfModule>
    
    # Disable directory listing
    Options All -Indexes
    
    # Remove header with PHP version
    Header always unset X-Powered-By
    Header unset X-Powered-By
    # END Security Block

    it works. Any suggestion?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nintechnet

    (@nintechnet)

    This code comes from another plugin/application that you installed on your blog, I’m afraid.
    NinjaFirewall doesn’t add any rewrite rules to your .htaccess.

    @rstackj

    Focus on this block of directives:

    # Block the include-only files.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^wp-admin/includes/ - [F,L]
    RewriteRule !^wp-includes/ - [S=3]
    RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
    RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
    RewriteRule ^wp-includes/theme-compat/ - [F,L]
    </IfModule>

    Use the # symbol to comment out one of the RewriteRule directives (e.g. # RewriteRule ^wp-admin/includes/ - [F,L]), save and test. Keep going until you find the offending rule. When you do, remove or leave that line commented out.

    These rules are advised here:
    https://ww.wp.xz.cn/support/article/hardening-wordpress/#securing-wp-includes

    Remove themes rules of you can contact the people from Rankmath to check why this happens. I remember me that you need to connect your site with Rankmath SaS app during the installation.

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘Ninja Firewall blocking Rank Math’ is closed to new replies.