5 Star 0 Fork 0

hi / webCollection

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
urlredirect.aspx.cs 1.07 KB
一键复制 编辑 原始数据 按行查看 历史
jack 提交于 2019-12-03 23:46 . feat: init
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
public partial class urlredirect : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
/* if( string.IsNullOrEmpty(Request.QueryString["note"]) )
{
string tmpurl = Request.QueryString["url"];
if (tmpurl == null)
{
Response.Write("null");
Response.Redirect("http://www.nochoose.com");
return;
}
if (!Regex.IsMatch(tmpurl, "(http|https|ftp|mms|rtsp|gopher|socks4|socks5)://.*"))
{
Response.Write("notnull");
Response.Redirect("http://" + tmpurl);
}
Response.Redirect(tmpurl);
}else{
Response.Write("<html><body><div style='font-size:1.6em;'>url is: &nbsp;" + Request.QueryString["url"] + "<br/>note is: &nbsp;" + Request.QueryString["note"]+"</div></body></html>");
} */
}
}
1
https://gitee.com/yanglihao2006/webCollection.git
git@gitee.com:yanglihao2006/webCollection.git
yanglihao2006
webCollection
webCollection
master

搜索帮助