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 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么
  • ¥15 banner广告展示设置多少时间不怎么会消耗用户价值
  • ¥15 可见光定位matlab仿真
  • ¥15 arduino 四自由度机械臂
  • ¥15 wordpress 产品图片 GIF 没法显示