473,387 Members | 3,801 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to get the requesting URL

How can I get the full url of the page that is calling my page? I tried the
below, but it gives me my page, not the page that redirected to me.
' Dim sURL as String

'if strcomp(Request.ServerVariables ("HTTPS"), "ON", 1) = 0 then

' sURL = "https://"

'else

' sURL = "http://"

'end if

' sURL = sURL & Request.ServerVariables ("SERVER_NAME")

' sURL = sURL & Request.ServerVariables ("SCRIPT_NAME")

' if len(trim(Request.QueryString.tostring)) 0 then

' sURL = sURL & "?" & Request.QueryString.tostring

'end if

'Response.Write(sURL)

Thanks.
Jul 26 '07 #1
1 1357
"magic kat" <ka**********@yahoo.comwrote in message
news:%2******************@TK2MSFTNGP03.phx.gbl...
How can I get the full url of the page that is calling my page? I tried
the below, but it gives me my page, not the page that redirected to me.
Request.ServerVariables("HTTP_REFERER")

However, this can't be relied upon, as some browsers are able to spoof it,
and many ISPs strip it from the Request headers...
--
Mark Rae
ASP.NET MVP
http://www.markrae.net

Jul 26 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Keith Bowes | last post by:
I have a script for requesting HTTP resources and I want it to use HTTP compression (to reduce bandwidth), if possible. What's the best way to do this? I've tried using zlib functions but they...
2
by: DaRemedy | last post by:
Hello people, Just a quick question if you guys wouldn't mind answering or pointing me in the right direction. How would I go about creating something like the 'ScreenCam' thingy on...
5
by: Eric R. | last post by:
I was looking through php.net's help guide and a few other documents that I cam across on the web but I am still having trouble finding the information I am looking for. So I came here... Here...
0
by: Ioannis Demetriades | last post by:
Hi, I am doing a VB.NET application with SQL Server 2000 and I need to implement a database search facility that will normally return lots of records. Those records will then be displayed in a...
3
by: David de Jong | last post by:
Does anyone how to get the url in e.g. http://localhost/dev/a/test.asp?id=1 (so I get test.asp). I've tried <% request.ServerVariables("URL") %> but it returns /dev/a/test.asp, so far I've also...
1
by: Charles A. Lackman | last post by:
Hello, I have made an aspx web application that is using Forms Authentication. Each unsecure page has a custom user control on it that will allow the visitor to login and enter secure pages. The...
1
by: Glenn M | last post by:
I know how i can use request.userhostaddress to get the requesting ip address. is their any way i can get the requesting clients subnet mask also?
4
by: Tim Mavers | last post by:
I am using HttpWebRequest to request a page from my own site. It works great when the site isn't running under SSL, but it fails when I run I turn on SSL. I am assuming I need to include some...
1
by: Aaron | last post by:
Not sure if this is the best spot to post this question, but I am not going to pay money to ask an installation question.... Anyways I am trying to install C# standard 2003 and it analyzes the...
3
by: timchilds | last post by:
I have the following request URL in an ASPx page: http://crm/custom/fileviewer/default.aspx?NAME I want to be able to parse the requesting URL and pass NAME into a variable. Can anyone give...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.