允许的推荐人名单较长

发布于 2024-08-30 08:23:51 字数 411 浏览 4 评论 0原文

我只想允许来自推荐人列表的热链接(付费客户,可能有几百个)。

我使用的是 Apache 1.3,并且无权访问配置(仅 .htaccess)。

实现这一点最快的方法是什么?

到目前为止我的想法:

  • PHP 与数据库和 readfile()

  • (SSI 与)Perl 和数据库

  • 列表实现为以允许引用者命名的符号链接,然后使用 HTTP_REFERER 进行 RewriteCond

  • .htaccess 中的所有内容,大量 RewriteCond 的内容

  • .htaccess 中的所有内容,大量 SetEnvIf 的

是否有更好(更快)的方法来执行此操作? 谢谢!

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!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

初见你 2024-09-06 08:23:51

我投票支持带有数据库和 readfile() 的 PHP,假设 readfile() 也会将任何更新写入 .htaccess,并且有权在文件级别执行此操作。

这样,您可以创建一个很好的后端来管理您的白名单,将您的工作重新打包到适当的开源项目中,并对数据进行适当的备份和完整性。

如果您想要速度,请记下它们需要多长时间,并让我们知道您的结果。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文