浏览量

以下信息来自用户自由发布或转载,并不代表本站观点!转载信息请注明出处,删除文章请联系我们。

asp获取网址开头是https还是http的方法

  SSL证书是数字证书的一种,类似于驾驶证、护照和营业执照的电子副本。网站使用SSL 证书 (SSL Certificates),并显示了签章 (Secured Seal),您的客户就知道他们的交易安全可靠,并且充分信赖您的网站。

  简单易懂的说法就是有SSL证书的网站网址开头是https而非普通网站的http。

  随着原来越多的网站使用SSL证书,获取当前页面的完整URL路径也会有所改变。ASP获取当前完整URL路径的函数代码在网上比较多,但获取https完整URL路径的确不多,今天本站就为大家来介绍关于ASP获取https完整URL路径的标准函数代码: 

<%
function GetUrl()
on Error Resume Next
Dim strTemp
if LCase(request.ServerVariables("HTTPS")) = "off" Then
    strTemp = "http://"
Else
    strTemp = "https://"
end if
strTemp = strTemp & Request.ServerVariables("SERVER_NAME")
if Request.ServerVariables("SERVER_PORT") <> 80 Then strTemp = strTemp & ":" & Request.ServerVariables("SERVER_PORT")
strTemp = strTemp & Request.ServerVariables("URL")
if trim(request.QueryString) <> "" Then strTemp = strTemp & "?" & Trim(Request.QueryString)
GetUrl = strTemp
End Function
response.write GetUrl()
%>