• Resolved icing

    (@icing)


    I am trying to add the following code to secure.htaccess from Edit/Upload/Download Tab of the plugin.

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://sitename.in [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://sitename2.in [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://www.sitename.in [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://www.sitename2.in [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://sitename3.in/ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://www.sitename3.in/ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://sitename4.in/ [NC]
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?https://www.sitename4.in/ [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ https://i.imgur.com/hX1mb.gif [NC,R,L]

    But when I click on update, I end up on a 404 page.

    I also have Better WP Security, tried disabling it. Still the same.

    .htaccess has 644 permission when I checked it under Security Status Tab.

    https://www.ads-software.com/extend/plugins/bulletproof-security/

Viewing 5 replies - 1 through 5 (of 5 total)
  • 404 errors are a common problem with the Better WP Security plugin. I am not sure exactly why that plugin causes these problems. Some day i will test that plugin.

    The .htaccess code you have posted here is not valid. I found this neat automatic hotlink protection .htaccess code generator here >>> https://www.htaccesstools.com/hotlink-protection/

    This is code that it created

    RewriteEngine on
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?ait-pro.com [NC]
    RewriteRule \.(jpg|jpeg|png|gif)$ - [NC,F,L]

    Thread Starter icing

    (@icing)

    Thanks AITpro for replying here. I have corrected the above code using the website you have given. Still when I click Update File, it doesn’t get updated and returns a 404(Nothing Found, Embarassing of page twentyeleven theme). I have deactivated all other plugins for the time being.

    Is there another way to edit .htaccess file with which bulletproof security plugin is fine with?

    Please let me know.

    Thanks

    Thread Starter icing

    (@icing)

    I have fixed the code and manually uploaded secure.htaccess file and now image hotlink protection is working.

    Though, I couldn’t update from within the plugin. Something, you might want to look into.

    Thanks AIT for your help.
    Topic Resolved

    Have you used AutoMagic to create your Master htaccess files?
    Did you Activate both BulletProof Modes?
    you need to activate Root and wp-admin BulletProof Modes together
    look at the System Info tab in BPS. Is your SAPI type DSO or CGI?

    I am assuming you have DSO and yes you would not be able to use the automation in BPS on a DSO Server because of ownership restrictions / permisssions that DSO imposes. 99% of folks have CGI so the automation works fine for them.

    Thread Starter icing

    (@icing)

    I used AutoMagic to create Master htaccess file. I activate all 4 bulletproof modes one by one starting from the bottom. SAPI is CGI.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: BPS Security] Editing .htaccess file to Protect hotlinking’ is closed to new replies.