Results 1 to 2 of 2
  1. #1

    .htaccess hotlinking prevention, prevent EVEN typed urls?

    Don't you hate it if you've managed to do something but broke it because you've accidently removed it?

    Well, happened to me.

    I had a .htaccess with a rule that ONLY if a file is directed from a certain referrer, it can be accessed. EVEN if you copy and paste the link in a browser and then type it, it'll show a hotlinking-image.

    But now I can't do it again... anyone got any pointers on how to set up .htaccess to even prevent directly typed URLs?

  2. #2
    Join Date
    Apr 2004
    What .htaccess code are you trying to use?

    If it's a rewrite, then usually it has something like (not exact syntax)

    RewriteRule !^$

    That says if there is no referer then let them pass. If you remove that, then that should stop typing the link directly.

    Be warned, most privacy blockers, some firewalls, and even web browsers with the correct settings will block the referrer from being sent. Therefore you could be blocking real traffic.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts