• Resolved +ES

    (@evelynmsdesigngraphicscom)


    Hello+

    I have the free version of WordFence (version 7.5.9) installed on my site and I received notice from my hosting that the “.htaccess file is being deprecated effective October 2022” & needs to be removed.

    I’ve looked at the file and it says the following:

    ***begin .htaccess file code***

    # BEGIN WordPress
    # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    # Wordfence WAF
    <IfModule mod_php5.c>
    	php_value auto_prepend_file '/nas/content/live/digandhold/wordfence-waf.php'
    </IfModule>
    <IfModule mod_php7.c>
    	php_value auto_prepend_file '/nas/content/live/digandhold/wordfence-waf.php'
    </IfModule>
    <Files ".user.ini">
    <IfModule mod_authz_core.c>
    	Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    	Order deny,allow
    	Deny from all
    </IfModule>
    </Files>
    
    # END Wordfence WAF

    ***end .htaccess file code***

    Since this .htaccess file code mentions Wordfence, then I assume this file is on my site because I am using Wordfence – correct?

    If so, then can this file be safely removed from the site without breaking the site and without breaking the Wordfence functionality?

    Please let me know if you need any additional information.
    Please advise. Thank you, +ES

Viewing 4 replies - 1 through 4 (of 4 total)
  • Anonymous User 17880307

    (@anonymized-17880307)

    You may have to move the auto_prepend_file rule to a .user.ini or php.ini file. But this also depends on the used webserver software and hosting panel.

    Which server software does your hoster use instead of Apache (which reads .htaccess files)?

    Thread Starter +ES

    (@evelynmsdesigngraphicscom)

    Hi, @danielrufde

    Thank you for the quick response.

    I reached out to them and they said they are using Nginx… And if you give me a Nginx version that says/does the same thing the .htaccess file says/does they would “add it to your Nginx configuration on the backend” …

    Can you give me a Nginx version of your .htaccess file?

    Anonymous User 17880307

    (@anonymized-17880307)

    Please try to create an empty .user.ini file via FTP and add this line to it:

    auto_prepend_file = "/nas/content/live/digandhold/wordfence-waf.php"

    Thread Starter +ES

    (@evelynmsdesigngraphicscom)

    Thank you very much!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘File Clarification’ is closed to new replies.