duandun2218 2014-01-14 05:48
浏览 59

运行代理脚本时.htaccess重定向我需要将某些URL重定向到DMCA删除页面

I've run into a problem I just cant solve that is:

I have a proxy script running on FileHound.co.uk

The htaccess file contains:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^ /?load=%{REQUEST_URI} [L,QSA]

I need to be able to redirect certain URL such as this:

filehound.co.uk/?load=/torrent/9392320/%5Ba-destiny%5D_toriko_-_135_(1280x720_hi10p_aac)_%5Bde83bd3d%5D.mkv

I want to prevent the link from displaying its destination instead being redirected to a page to i.e. /DMCA/DMCA.html

There are many links that need redirecting in a similar way. As I say its a proxy script and so I cant remove the page or material myself.

Any help would be much appreciated...

  • 写回答

1条回答 默认 最新

  • drqefnd544707688 2014-01-14 06:06
    关注

    If you put all the links that need to be redirected in a database then you can query that table and redirect if it exists something like this (pseudo code):

    # if (url in db)
    #     redirect /DMCA/DMCA.html
    

    Don't forget to sanitize your input, don't want sql injection ;)

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog