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

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

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

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

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

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

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

廣告:

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

解決方案:新建一個代理頁面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 = "";  //相對網(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)注 廣州閱速科技
延安市| 教育| 天水市| 中西区| 华坪县| 墨脱县| 麻江县| 大安市| 文登市| 新乡市| 光泽县| 黎城县| 会理县| 沛县| 华阴市| 永春县| 西林县| 芮城县| 苍梧县| 南和县| 出国| 新宾| 景谷| 柳林县| 四会市| 越西县| 通江县| 黑龙江省| 钟祥市| 蒙城县| 伊宁县| 葫芦岛市| 永新县| 东台市| 内黄县| 犍为县| 黑龙江省| 遂平县| 饶河县| 陕西省| 鹿邑县|