亚洲3P视频,日韩BBW无码,亚洲制服麻豆网站,88re伊人,九草精品视频在线观看,国产精品久久夜,色青青狠狠色,无码熟女一区二区三区,日本一区二区成人网站

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

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

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

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

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

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

廣告:

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

解決方案:新建一個(gè)代理頁(yè)面HttpsPage.aspx,在服務(wù)器中訪問(wèn)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)購(gòu)買(mǎi)咨詢
掃描關(guān)注 廣州閱速軟件科技有限公司
掃描關(guān)注 廣州閱速科技
双流县| 上栗县| 封开县| 同仁县| 玉环县| 青岛市| 南丰县| 平乐县| 翁源县| 酉阳| 和平区| 白城市| 乌拉特前旗| 逊克县| 金乡县| 平泉县| 平果县| 灵武市| 武安市| 潼南县| 铁岭市| 宣武区| 南投县| 峨眉山市| 宝鸡市| 灌阳县| 平泉县| 南川市| 建昌县| 临桂县| 裕民县| 峨眉山市| 来宾市| 罗甸县| 天镇县| 新乡市| 乌什县| 红原县| 龙江县| 秀山| 洛川县|