Support » Fixing WordPress » 3 unknown lines of code in .htaccess

  • Hi there! I have 3 lines of code in my htaccess file and don’t have a clue what they’re doing (I’m not a programmer).

    Is anyone able to tell me what these might be doing, and whether I need them? thank you for your time!

    RewriteRule .*\.()$ – [F,NC]

    RewriteRule .*\.()$ – [F,NC]

    RewriteRule .*\.()$ – [F,NC]

Viewing 4 replies - 1 through 4 (of 4 total)
  • See Apache Rewrite rules. NC means no case, F means forbidden. Not an Apache rewrite rules pro, but the rule RewriteRule .*\.()$ – [F,NC] appears to be blocking filenames ending in a period (“filename.”). See Webhosting Talk thread.These are not standard WordPress rules. Could be that you have been hacked, could be added by a plugin. To be honest this data seems to be incomplete and the rules repetitive.

    Thank you! ^

    Yea, it did seem incomplete.

    I recently enabled an option in cpanel to block image hotlinking, then disabled it.

    I was thinking maybe this code is leftover from that…

    I’ll try commenting it out and see what happens I guess…. I know that’s a bit risky but I can always add it back

    Did you try enabling “image hotlinking protection” in your cpanel?

    It could have been added because of that…

    ..oops sorry, you already mentioned it…yes definitely it’s because of that, and those lines need to be removed in case you have disabled it…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘3 unknown lines of code in .htaccess’ is closed to new replies.