• Resolved born2excite

    (@born2excite)


    The php_value auto_prepend_file rule is NOT in my public_html/.htaccess file. Can you please explain how I can fix this?

    Below is a copy of the current Wordfence rules in public_html/.htaccess file:

    # Wordfence WAF
    <Files "php.ini">
    <IfModule mod_authz_core.c>
    	Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    	Order deny,allow
    	Deny from all
    </IfModule>
    </Files>

    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @born2excite,

    Is WAF not loading when PHP pages are executed? Can I have you check under Wordfence -> Tools -> Diagnostics -> Wordfence Firewall?

    If it says Yes for WAF auto prepend active, it’s possible that the auto_prepend_file is properly set under php.ini:

    For example: https://i.imgur.com/6Lend9T.png

    However, it it says No, can you try going to Wordfence -> Firewall -> All Firewall Options, and pressing Optimize the Wordfence Firewall?

    The button is located here: https://i.imgur.com/WUQKd9j.png

    Dave

    Thread Starter born2excite

    (@born2excite)

    Hey Dave,

    Thanks so much for your quick and detailed reply!

    I followed your instructions and confirm:
    1) Under Wordfence -> Tools -> Diagnostics -> Wordfence Firewall
    Yes for WAF auto prepend active

    2) In public_html/php.ini, I found:
    auto_prepend_file is set and pointing to wordfence-waf.php

    The auto_prepend_file is set in the .htaccess file in one of my sites. I worried when I didn’t find auto_prepend_file set in the .htaccess file on the second site.

    All good now. BIG thank you, Dave

    Cheers,
    Julian 😁

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘auto_prepend_file Rule Missing’ is closed to new replies.