Finns det något VB kommando som printar ut sitens domännamn?
Request.ServerVariables("SCRIPT_NAME") skiver ut rootpathen.
Jag vill få fram:
"http://www.sitenamn.se" för att sedan lägga till Request.ServerVariables("SCRIPT_NAME").
Jag vet nämligen redan nu att hela siten kommer att byta namn och jag har tidigare hårdkodat in den informationen.
:h
En funktion du skulle kunna använda. :)
Function GetPageURL()
Dim sProtocol, sServerName, sScriptName, sQueryString
If UCase(Request.ServerVariables("HTTPS")) = "ON" Then
sProtocol = "https://"
Else
sProtocol = "http://"
End If
sServerName = Request.ServerVariables("SERVER_NAME")
sScriptName = Request.ServerVariables("SCRIPT_NAME")
sQueryString = Request.QueryString
If Len(sQueryString) Then sQueryString = "?" & sQueryString
GetPageURL = sProtocol & sServerName & sScriptName & sQueryString
End Function