人妻无码中文字幕永久在线,99RE6这里有精品热视频,国产成人综合色就色综合 ,蜜臀av在线观看

新聞建站cms系統(tǒng)、政府cms系統(tǒng)定制開發(fā)

廣州網(wǎng)站建設(shè)公司-閱速公司

asp.net新聞發(fā)布系統(tǒng)、報(bào)紙數(shù)字報(bào)系統(tǒng)方案
/
http://www.jdki.com.cn/
廣州網(wǎng)站建設(shè)公司
您當(dāng)前位置:首頁>網(wǎng)站技術(shù)

網(wǎng)站技術(shù)

https網(wǎng)站訪問iframe下的http內(nèi)容

發(fā)布時(shí)間:2020/11/10 14:48:52  作者:Admin  閱讀:1881  

廣告:

如何在https站點(diǎn)的iframe中允許http內(nèi)容:

解決方案:新建一個(gè)代理頁面HttpsPage.aspx,在服務(wù)器中訪問http內(nèi)容(少數(shù)有效)

前端代碼:

<%string weixinpay="";
if (ViewData["weixinpay"]!=null)
weixinpay= ViewData["weixinpay"].ToString();
string ifaurl=payApi+"weixinpay.aspx?body="+weixinpay;
if (Request.Url.ToString().ToLower().Contains("ttps://"))
ifaurl=webd+"Jqueryfile/HttpsPage.aspx?url="+ifaurl+"&http="+payApi; %>

<div class="code_pic" id="showWechatUrl"><iframe src="<%=ifaurl%>" frameborder="0" scrolling="no"></iframe></div>

后端代碼:

string url = "";
if (Request.QueryString["url"] != null)
url = Request.QueryString["url"].ToString();
string http = "";  //相對(duì)網(wǎng)址轉(zhuǎn)為 http互聯(lián)網(wǎng)網(wǎng)址
if (Request.QueryString["http"] != null)
http = Request.QueryString["http"].ToString();
if (url != "")
{

//Response.Write(url);
string res = HttpService.Get(url);

Regex Areareg3 = new Regex(@"src=""(.*?)""", RegexOptions.IgnoreCase | RegexOptions.Compiled);
res = Areareg3.Replace(res, "src=\""+http+"$1\"");

Regex Areareg2 = new Regex(@"href=""(.*?)""", RegexOptions.IgnoreCase | RegexOptions.Compiled);
res = Areareg2.Replace(res, "href=\"" + http + "$1\"");
Response.Write(res);
}
Response.End();

廣告:

相關(guān)文章
https
iframe
cms新聞系統(tǒng)購買咨詢
掃描關(guān)注 廣州閱速軟件科技有限公司
掃描關(guān)注 廣州閱速科技