Ad Inserter Pro – htaccess code

Home Forums BulletProof Security Pro Ad Inserter Pro – htaccess code

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #40588
    aoba
    Participant

    Hello,

    The ARQ caught this file change to the root .htacess

    the 2 files were identical, except for this part attached at the end of the new file.

    The new file were sent to quarantine however i’m wondering if this is related to the recent update?

    # BEGIN WordPress
    231	
    # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
    232	
    # dynamically generated, and should only be modified via WordPress filters.
    233	
    # Any changes to the directives between these markers will be overwritten.
    234	
    
    235	
    RewriteEngine On
    236	
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    237	
    RewriteBase /
    238	
    RewriteRule ^index\.php$ - [L]
    239	
    RewriteRule ^ai-statistics-report\-([0-9A-Za-z\.\_\-]+) /wp-admin/admin-ajax.php?action=ai_ajax&ai-report=$1 [QSA,L]
    240	
    RewriteCond %{REQUEST_FILENAME} !-f
    241	
    RewriteCond %{REQUEST_FILENAME} !-d
    242	
    RewriteRule . /index.php [L]
    243	
    
    244	
    245	
    # END WordPress
    

    Is it dangerous?

    thanks

    #40591
    AITpro Admin
    Keymaster

    The htaccess code is created by the Ad Inserter Pro plugin > https://adinserter.pro/documentation/ad-impression-and-click-tracking.  Do these steps below to add the Ad Inserter Pro htaccess code to BPS Root Custom Code to save it permanently.

    1. Go to the BPS Pro > B-Core > Custom Code tab page.
    2. Copy the code below into this BPS Root Custom Code text box:  8. CUSTOM CODE WP REWRITE LOOP START.
    3. Click the Save Root Custom Code button.
    4. Go to the Security Modes page and click the Root folder BulletProof Mode Activate button.

    If your site is HTTPS/SSL:

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteCond %{HTTPS} !=on
    RewriteCond %{SERVER_PORT} ^80
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
    RewriteRule ^index\.php$ - [L]
    RewriteRule ^ai-statistics-report\-([0-9A-Za-z\.\_\-]+) /wp-admin/admin-ajax.php?action=ai_ajax&ai-report=$1 [QSA,L]

    If your site is HTTP:

    # WP REWRITE LOOP START
    RewriteEngine On
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteRule ^ai-statistics-report\-([0-9A-Za-z\.\_\-]+) /wp-admin/admin-ajax.php?action=ai_ajax&ai-report=$1 [QSA,L]
    #40593
    aoba
    Participant

    Thanks for the instructions,

    I followed your steps and saved.

    Now what should i do with the file in the quarantine? should i delete it?

    #40594
    AITpro Admin
    Keymaster

    Yep, delete the auto_.htaccess (root htaccess) file in Quarantine.

    #40595
    aoba
    Participant

    Thanks..

    #40623
    aoba
    Participant

    Hello,

    I’m trying to add the code to another site, but it’s giving me 403 error!

    any ideas why is that?

    #40624
    AITpro Admin
    Keymaster

    Where are you seeing the 403 error? When trying to save the custom htaccess code in BPS Root Custom Code or when trying to do something else?  Did you do all the steps when adding the custom code? Is this site a root WP site:  example.com or a subdirectory WP site: example.com/wordpress-subdirectory-site/?

    #40629
    aoba
    Participant

    Hello,

    The site is in the root dir.

    I did as you instructed, Opened the b-core, and went to number 8 in  Root htaccess File Custom Code

    copy and paste the code provide above. then clicking save.. then 403

    #40630
    AITpro Admin
    Keymaster

    That’s a very common problem caused by ModSecurity installed in your web host control panel.  Click the Encrypt Custom Code button first before clicking the Save Root Custom Code button to evade/bypass ModSecurity.

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.