473,505 Members | 15,626 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Obtain URL with Request.ServerVariables

I have the following url:
https://test.mywebsite.com/secure/pr...sp?TOPIC_ID=21

How can I get the value "secure/programs/test.asp?TOPIC_ID=21"

I can't use Request.ServerVariables("HTTP_REFERER") because the user
may have the web page bookmarked.

I've also tried Request.ServerVariables("URL") but this only gave me
"secure/programs/test.asp". I need everything that comes after
https://test.mywebsite.com/.

Is there a Request.ServerVariables command that will give me this? I
know that there's got to be something that does this, but I'm having
problems finding info.

Thanks!
crjunk

Jul 22 '05 #1
3 9769
I finally figured out that I can use
request.servervariables("URL") & "?" & Request.querystring
to get what I want. Duh!!!

Thanks!
crjunk

Jul 22 '05 #2
sPath = Request.ServerVariables("URL")
sQString = Request.Querystring
If Len(sQString) > 0 Then sPath = sPath & "?" & sQString

Response.Write sPath

Ray at work

"crjunk" <cr****@earthlink.net> wrote in message
news:11*********************@g14g2000cwa.googlegro ups.com...
I have the following url:
https://test.mywebsite.com/secure/pr...sp?TOPIC_ID=21

How can I get the value "secure/programs/test.asp?TOPIC_ID=21"

I can't use Request.ServerVariables("HTTP_REFERER") because the user
may have the web page bookmarked.

I've also tried Request.ServerVariables("URL") but this only gave me
"secure/programs/test.asp". I need everything that comes after
https://test.mywebsite.com/.

Is there a Request.ServerVariables command that will give me this? I
know that there's got to be something that does this, but I'm having
problems finding info.

Thanks!
crjunk

Jul 22 '05 #3
Request.ServerVariables("URL") & "?" & Request.ServerVariables("QUERY_STRING")

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

"crjunk" <cr****@earthlink.net> wrote in message news:11*********************@g14g2000cwa.googlegro ups.com...
I have the following url:
https://test.mywebsite.com/secure/pr...sp?TOPIC_ID=21

How can I get the value "secure/programs/test.asp?TOPIC_ID=21"

I can't use Request.ServerVariables("HTTP_REFERER") because the user
may have the web page bookmarked.

I've also tried Request.ServerVariables("URL") but this only gave me
"secure/programs/test.asp". I need everything that comes after
https://test.mywebsite.com/.

Is there a Request.ServerVariables command that will give me this? I
know that there's got to be something that does this, but I'm having
problems finding info.

Thanks!
crjunk


Jul 22 '05 #4

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

Similar topics

2
5170
by: jason | last post by:
How does one capture the IP address of the user ....and...is there anything 'unique' you can do with this info besides knowing the ip number of his domain/browser? Thanks Jason
2
6662
by: W. Loo | last post by:
Hi, I've got a question regarding the usage of Request.ServerVariables. I'm not sure this is really a ASP question, so redirects to a more appropriate newsgroup are welcome. I have a variable...
2
1764
by: Marco | last post by:
I need to obtain the domain from server side code. Request.Servervariables("URL") doesn't work well... it miss the domain name. I tried to use the WScript.NetWork object but the domain is not...
2
1647
by: TS | last post by:
I seem to remember reading somewhere that accessing this collection is expensive and you should avoid it if possible. Are there any alternatives to the following: Request.ServerVariables; ...
8
8122
by: nsyforce | last post by:
Can you add a header to a request in an http module? I'm trying unsuccessfully. Here's an example of my code: public void Init(HttpApplication r_objApplication) { ...
4
2650
by: Ed Willis | last post by:
We have several offices that have a DSL or Cable modem where the IP address is dynamic and changes often. I created a VB app that obtains the IP address but it obtains the IP address within the...
1
2775
by: preet | last post by:
I posted this elsewhere ; probably the wrong place so i am posting this again I am using the following script: hrefer=Request.Servervariables("HTTP_REFERER")...
7
3309
by: Brian Cryer | last post by:
What I'm looking for is a way to tell if two sessions are from the same physical PC or from different PCs (within the same organisation say). This is with the view to possibly enforcing license...
2
4105
by: Henry Stock | last post by:
I don't seem to understand how to use the value: Request.ServerVariables("remote_addr") I am trying to pass the ip address of a sending web client in the body of an email message. When I...
0
7216
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7303
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7367
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7018
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5613
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5028
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3187
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3176
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1528
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.