help:URL重写超难度问题
这个网址http://a.com/http://www.b.com如何重写为http://a.com/share.aspx?url=http://www.b.com --------------------编程问答--------------------
--------------------编程问答--------------------
string str = "http://a.com/http://www.b.com";
string[] temp = str.Split(new string[] { "http://" }, StringSplitOptions.RemoveEmptyEntries);
string result = string.Concat("http://", temp[0], "share.aspx?url=", "http://", temp[1]);
Console.WriteLine(result);
string url = "http://a.com/http://www.b.com";
int p = url.LastIndexOf("http");
string result = url.Substring(0, p) + "share.aspx?url=" + url.Substring(p);
补充:.NET技术 , C#