<%@ WebHandler Language="C#" Class="image" %> using System.Web; /// /// Summary description for file /// public class image : IHttpHandler { public void ProcessRequest(HttpContext context) { var filePath = context.Request.QueryString["picture"]; var file = filePath.Split(',')[0]; if (string.IsNullOrEmpty(file)) { context.Response.Write("链接出错"); context.Response.End(); } context.Response.Redirect("http://www.grapecity.com.cn/files/blogs/" + file); context.Response.End(); } public bool IsReusable { get { return false; } } }