URL PARAMETERS

   

arrow_back
arrow_forward
arrow_upward
SPR
REF
Name of the current file
SCRIPT_NAME <%Response.Write Request.ServerVariables("SCRIPT_NAME")%> /PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp
PATH_INFO <%Response.Write Request.ServerVariables("PATH_INFO")%> /PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp
URL <%Response.Write Request.ServerVariables("URL")%> /PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp
Entire URL
Inclussive of HTTP and HTTPS
prot = "http"
https = lcase(request.ServerVariables("HTTPS"))
if https <> "off" then prot = "https"
domainname = Request.ServerVariables("SERVER_NAME")
filename = Request.ServerVariables("SCRIPT_NAME")
querystring = Request.ServerVariables("QUERY_STRING")
response.write prot & "://" & domainname & filename & "?" & querystring
%>
https://www.currencypin.com/PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp?QryString=A8B
Page name ONLY
Page name, with IF logic
-> version scr
<%
scr = Request.ServerVariables("SCRIPT_NAME")
if instr(scr,"/")>0 then
scr = right(scr, len(scr) - instrRev(scr,"/"))
end if
response.write scr
%>
viewURL.asp
Page name, without logic
->version scrA
<%
scrA = Request.ServerVariables("SCRIPT_NAME")
loc = instrRev(scrA,"/")
scrA = mid(scrA, loc+1, len(scrA) - loc)
response.write scrA
%>
viewURL.asp
HTTP_HOST <%=Request.ServerVariables("HTTP_HOST")%> www.currencypin.com
     
Referer Domain <%
referrer = Request.ServerVariables("HTTP_REFERER")
segments = Split(referrer, "/")
IF isarray(segments) then
IF ubound(segments) >= 2 then
referringDomain = segments(2)
END IF
End If
response.write referringDomain
%>
Referer Page (Calling From) <%
str = request.servervariables("http_referer")
If str <> "" Then
referrerArr = Split(str, "/")
referrer = referrerArr(UBound(referrerArr))
strArr = Split(referrer, "?")
If UBound(strArr) > 0 Then
referrer = strArr(0)
End If
End If
response.write "Referrer: " & referrer & "<br><br>"
ref_Info=Ucase(Replace(referrer, ".asp", " "))
response.write "Ref.Info: " & ref_Info
%>
Referrer:

Ref.Info:
Folder Name <%
Response.Write "http://" & Request.ServerVariables("server_name") &_
left(Request.ServerVariables("SCRIPT_NAME"),
InStrRev(Request.ServerVariables("SCRIPT_NAME"),"/"))
%>
http://www.currencypin.com/PrepaidMeterReports/Admin/Appearance/Visual/
Thsi Page Simple URL <%
Thispage="http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL")
response.write Thispage
%>
http://www.currencypin.com/PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp
     
Request.ServerVariables("URL") & "?" & Request.Querystring <%
ThatPage ="http://" & Request.ServerVariables("SERVER_NAME") & Request.ServerVariables("URL") & "?" & Request.Querystring
response.write ThatPage
%>
http://www.currencypin.com/PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp?QryString=A8B
Request.servervariables("http_referer") <%
AnotherPage=request.servervariables("http_referer")
response.write AnotherPage
%>
Similar <%
Response.Write Request.ServerVariables("SCRIPT_NAME") & "<br>"
Response.Write Request.ServerVariables("PATH_INFO") & "<br>"
Response.Write Request.ServerVariables("URL")
%>
/PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp
/PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp
/PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp


Use server variable, submit to self Version scrA, Action intended to self page: viewURL.asp




Reply expected submitted value:
Version scr, Action intended to self page: viewURL.asp




Reply expected submitted value:
action: /PrepaidMeterReports/Admin/Appearance/Visual/viewURL.asp
1. Response.Redirect(Request.Path); In which the path to the request is presented in the following form: /MyApp/MyFile.aspx action=(Request.Path)

 

Standard link StandardLink
Link with # LinkWith#
Link with ASP LinkWithASP
Link with ASP+Parameters LinkWithASP+Parameters

Parameter1:
Parameter2:

2. Response.Redirect(Request.RawUrl); In which not only is the path exposed, but also any querystring parameters like: /MyApp/MyFile.aspx?foo=bar action=(Request.RawUrl)



 
3. Response.Redirect(Request.Url.ToString()); action=(Request.Url.ToString()