Exclude caching one js file – which htaccess ?

Home Forums BulletProof Security Pro Exclude caching one js file – which htaccess ?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #45403
    beatty2020
    Participant

    Client carousel is not working in siteground hosting despite caching turned off everywhere. Carousel perfectly in a different server; carousel developer says to exclude a single js file from caching.

    Siteground gave me code to put in the htaccess file to exclude this file.

    I added it to root htaccess, bottom of the page, saved it, got a 500 error. Restored the db and files completely, got the site back.

    Where exactly do I add this code:

     

    <If "%{REQUEST_URI} =~ /wp-content/plugins/display-a-meta-field-as-block-premium/build/carousel.js$/">
      
        Header set Cache-Control "private"
      
    

    Thanks in advance.

    #45404
    AITpro Admin
    Keymaster

    Delete that htaccess code. The BPS Plugin Firewall is blocking that plugin js script. Do the steps below to manually add a whitelist rule. Go to BPS Pro menu > Plugin Firewall menu link > Plugin Firewall Whitelist Tools text area.

    Adding a Plugin Firewall whitelist rule manually
    1. Copy and paste this whitelist rule: /display-a-meta-field-as-block-premium/build/carousel.js(.*) in the Plugins Script|File Whitelist Text Area. Important!!! whitelist rules are separated by a comma and a space.
    2. Click the Save Whitelist Options button.
    3. Turn AutoPilot Mode On.
    4. Click the Activate button to activate the Plugin Firewall.

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