Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author AITpro

    (@aitpro)

    1. You would copy this example code shown below from your root htaccess file.
    NOTE: this is example code – you should copy your actual code from your root htaccess file in case it is slightly different than this example code.

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]

    2. Paste your WP REWRITE LOOP START code into this BPS Root Custom Code text box: CUSTOM CODE WP REWRITE LOOP START
    3. Edit the WP REWRITE LOOP START code in the Custom Code text box and add the RewriteRule .* - [E=noabort:1] line of code as shown below.

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /
    RewriteRule .* - [E=noabort:1]
    RewriteRule ^index\.php$ - [L]

    4. Click the Save Root Custom Code button.
    5. Go to the BPS Security Modes page, click the Create secure.htaccess File AutoMagic button and activate Root folder BulletProof Mode.

    Thread Starter pa_esp

    (@pa_esp)

    Hello,

    That’s brilliant! Thank you very much for your help and very quick answer.

    All the best, Paul

    Hello. Today i received an email stating that I needed to amend my code. I have already completed this previously however I now see a difference in code as below – please help me understand and resolve – Cheers.
    ……………………………….
    Email directs me to the following word fence support page: https://support.wordfence.com/support/solutions/articles/1000129050-running-wordfence-under-litespeed-web-server-and-preventing-process-killing-or
    ……………………………….
    In my Custom box: CUSTOM CODE WP REWRITE LOOP START:

    I have:
    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteBase /
    RewriteRule .* – [E=noabort:1]
    RewriteRule ^index\.php$ – [L]

    The article suggests:
    RewriteEngine On
    RewriteBase /
    RewriteRule .* – [E=noabort:1]
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    The following parameters are missing in my Custom box: CUSTOM CODE WP REWRITE LOOP START: :
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d

    Hope that makes sense.

    PS: There was a recent word fence upgrade which actually gave us a few false positives e.g in gravity forms, that was resolved after an update and a fresh scan. However since i received this and ultimately want to ensure that I don’t have any hanging processes on the server we are hosted on.

    Many Thanks

    Plugin Author AITpro

    (@aitpro)

    You have done the Custom Code steps correctly to add the custom .htaccess code. If you take a look at the BPS root htaccess file using the BPS htaccess File Editor you will see that the top section (WP REWRITE LOOP START) and the bottom section (WP REWRITE LOOP END) of the standard WordPress Rewrite code are in the root htaccess file and what is inbetween the START and END WordPress Rewrite code is all of the BPS htaccess security rules/filters.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Where to add custom code for Wordfence/Litespeed server problems’ is closed to new replies.