0

I want to allow hotlinking only from a list of referrers (paying customers, probably a few hundred).

I am on Apache 1.3 and I do not have access to the configuration (only .htaccess).

What is the fastest way to implement this?

My thoughts so far:

  • PHP with database and readfile()

  • (SSI with) Perl and database

  • the list implemented as symlinks named after the allower referrer, then RewriteCond using HTTP_REFERER

  • everything in .htaccess, lots of RewriteCond's

  • everything in .htaccess, lots of SetEnvIf's

Any better (faster) ways to do this? Thanks!

Tim
  • 403
  • 4
  • 9

1 Answers1

0

I vote for PHP with database and readfile(), presuming readfile() will also write any updates to the .htaccess, and has permission to do so on the file-level.

That way, you can create a nice backend to manage your whitelist, repackage your efforts into a proper open source project, and have proper backup and integrity of your data.

If you want speed, time how long they all take, and let us know your results.

servermanfail
  • 2,532
  • 20
  • 21