2012-11-24 49 views
-1

是否可以使用.htaccess重写规则隐藏部分链接? 我正在研究热链接保护。播放列表与以下链接生成:http://site.com/get.playlist.php?htaccess:如何隐藏部分链接?

全链路:

http://site.com/get.playlist.php?playlist=http://site.com/video/34141ce7760f58f0c3eb5e0c758afb69/pl/playlist.txt&hash=34141ce7760f58f0c3eb5e0c758afb69 

我想显示链接而不&hash=http://site.com/get.playlist.php?playlist=

这样的:

http://site.com/video/34141ce7760f58f0c3eb5e0c758afb69/pl/playlist.txt 
+0

难道你不只是防止该链接的任何其他防盗链? ! 的RewriteCond%{HTTP_REFERER}^HTTP(S):(WWW \)?// yourdomain.com [NC] 重写规则\(JPG | JPEG | PNG | GIF)$ HTTP://hpmouse.googlepages。 COM/hotlink.gif [NC,R,L] – Popnoodles

回答

1

不幸的是,这是不可能的(至少,不是以任何理性的方式)使用.htaccess

有没有办法来改变浏览器是displaying-但是URL,你可能做opposite- .htaccess确实有保持URL相同,但显示不同的网页服务器上的电源。

这将是一个有点难以设置(因为尤其是hash参数),但可能有一些为你考虑。

+0

我明白了,所以我会写什么规则来保持URL相同,但显示不同的页面在服务器上? –

+0

开辟为不同的问题http://stackoverflow.com/questions/13544765/htaccess-how-can-i-keep-the-same-the-url-but-display-a-different-page-on-the –