繁体   English   中英

如何使用mod_rewrite隐藏重定向的URL

[英]How to hide the redirected URL with mod_rewrite

有什么办法可以隐藏重定向的URL,这就是我的想法:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -f
RewriteRule ^(.*)$ http://minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://%{HTTP_HOST}%{REQUEST_URI}&force

因此,较长的重定向网址http://minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php?url=http://% {HTTP_HOST}%{REQUEST_URI}到较短的类似/mintedomain.com/track/

有可能的?

阿德里安

编辑:

安德鲁:

这是一个带有文件下载跟踪器插件的统计软件Mint(haveamint.com)。 文件下载跟踪器通过以下方式工作:

在.htaccess中,每个文件(zip,rar,txt等)都被重定向到tracker.php文件(由于统计信息): http : //mydomain.com/mint/pepper/tillkruess/downloads/tracker.php? url = http://% {HTTP_HOST}%{REQUEST_URI}

因此,对于zip文件,重定向的url看起来像这样: http : //minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php? url= http : //mydomain/downloads/apple.zip

重定向的URL非常长且难看。 对我来说,最好的办法是将该重定向的URL重定向到较短的URL:例如: http : //mydomain.com/track/downloads/apple.zip ..

因此, http://mydomain.com/track将是http://minteddomain.com/mint/pepper/tillkruess/downloads/tracker.php

我不确定您要做什么。 您是要隐藏长网址中的所有“丑陋”内容,还是拥有http://minteddomain.com/track/www.example.com/whatever.html ,然后它将重定向到http://www.example。 com / whatever.html 或者,您是否试图不让URL显示正在完全重定向用户?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM