• Resolved gcoghill

    (@gcoghill)


    My webhost asked me to add hotlink protection via htaccess to track down some CPU hogging.

    My blog’s URL is mydomain.com/blog

    I used this online tool to generate the htaccess code: https://www.htaccesstools.com/hotlink-protection/

    When I entered the URL, I entered it exactly as it is above. Is that correct? Also, does it matter where in the htaccess file the code is placed? I have it placed at the end of the file.

    It is preceded by the WP-Super Cache htaccess code, and then the standard WP permalinks code. After those two I added the hotlink code.

    When testing it on this page: https://www.htaccesstools.com/test-hotlink-protection/

    It doesn’t seem to be working.

    I am not sure what I am doing wrong. I use htaccess in other non-WP areas of my site and it works OK (for 301 redirects and such) so I know htaccess is enabled and works.

Viewing 4 replies - 1 through 4 (of 4 total)
  • henkholland

    (@henkholland)

    Did yo put it next to your index.php (in the directory blog)?

    Thread Starter gcoghill

    (@gcoghill)

    Yes I did. I also have htaccess file in the main site directory (xyz.com/.htaccess) and wondered if maybe that could be causing a conflict.

    henkholland

    (@henkholland)

    When testing if the protection works, first empty your browsers cache/history etc
    Then you will get the red X

    Thread Starter gcoghill

    (@gcoghill)

    Ah you know what – I tried from another browser and it seems to be working. Thanks for the tip!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘htaccess – different if URL is mydomain.com/blog?’ is closed to new replies.