Response.Redirect没有正确重定向

时间:2015-06-24 06:39:37

标签: asp.net .net vb.net iis

我有这个网站让我们称之为 www.mysite.com 我使用视线向用户显示一些图像。例如:用户将请求如下图像(加密当然) 例如mysite.com/download.aspxid?123123admaodko39032l2k

mysite.com/content/images/1.jpg (加密后)

我遇到的问题是,一旦我在解密网址后{i} public interface FooGateway { public void foo(String foo); } 我将被引导到的网址是

mysite.com/mysite.com/content/images/1.jpg 注意mysite.com是如何重复两次的。

我不确定IIS配置是否有任何技巧。

1 个答案:

答案 0 :(得分:2)

从网址中删除mysite.com。

  header("Content-type: application/octet-stream");
  header("Content-Disposition: attachment; filename=".$name);
  header("Pragma: no-cache");
  header("Expires: 0");
  readfile($file);
  exit;
相关问题