473,700 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Requesting URL

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.ServerV ariables("URL") %> but it
returns /dev/a/test.asp, so far I've also heard to use InstrRev, but I don't
know how to use it....

TIA
Jul 19 '05 #1
3 3514
if strcomp(Request .ServerVariable s ("HTTPS"), "ON", 1) = 0
then
sURL = "https://"
else
sURL = "http://"
end if
sURL = sURL & Request.ServerV ariables ("SERVER_NAM E")
sURL = sURL & Request.ServerV ariables ("SCRIPT_NAM E")
if len(trim(Reques t.QueryString)) > 0 then
sURL = sURL & "?" & Request.QuerySt ring
end if

Response.Write sURL
-----Original Message-----
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.ServerV ariables ("URL") %> but itreturns /dev/a/test.asp, so far I've also heard to use InstrRev, but I don'tknow how to use it....

TIA
.

Jul 19 '05 #2
Oops. This answer will not be enough to get the result you want.

I think this will work.
<%
sScript = Request.ServerV ariables("SCRIP T_NAME")
aScript = Split(sScript, "/")
sScript = aScript(UBound( aScript))

Response.write sScript
%>

Ray at work

"Ray at <%=sLocation% >" <myfirstname at lane34 dot com> wrote in message
news:eb******** ******@TK2MSFTN GP12.phx.gbl...
<%

For Each x in Request.ServerV ariables
Response.Write x & " = " & Request.ServerV ariables(x) & "<br>"
Next

%>

Make a page with that code and take a look at the available server
variables.

Ray at work

"David de Jong" <news_jonggoud@ @@jonggoud.nl> wrote in message
news:7QL_a.1541 1$tK5.2006383@z onnet-reader-1...
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.ServerV ariables("URL") %> but

it
returns /dev/a/test.asp, so far I've also heard to use InstrRev, but I

don't
know how to use it....

TIA


Jul 19 '05 #3
Thanks, this seems to work, I have to say that I didn;t think of this
solution yet,
David
"Adrian Forbes - MVP" <ad****@xxxnoem ailxxx.com> wrote in message
news:0f******** *************** *****@phx.gbl.. .
if strcomp(Request .ServerVariable s ("HTTPS"), "ON", 1) = 0
then
sURL = "https://"
else
sURL = "http://"
end if
sURL = sURL & Request.ServerV ariables ("SERVER_NAM E")
sURL = sURL & Request.ServerV ariables ("SCRIPT_NAM E")
if len(trim(Reques t.QueryString)) > 0 then
sURL = sURL & "?" & Request.QuerySt ring
end if

Response.Write sURL
-----Original Message-----
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.ServerV ariables

("URL") %> but it
returns /dev/a/test.asp, so far I've also heard to use

InstrRev, but I don't
know how to use it....

TIA
.

Jul 19 '05 #4

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

Similar topics

8
2317
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 always return FALSE. And I've tried to use the zlib wrapper, which works but makes non-compressed resources take longer. TIA.
2
1534
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 http://www.xenocoder.co.uk/wordpress/ If you look on the top right corner of the page there is a little window which displays his desktop and when clicked upon, opens up a larger window and updates every so often whilst telling the visitor when it was last...
5
1710
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 is my question: I was wondering if there was a way to load information into a page without using SQL or anything fancy. Say I had a page setup with the body of the page being pulled in with a 'require' command and a menu bar on the left. (This...
0
1562
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 datagrid. What I want to do is not to create a complete dataset but a partial one, and whenever i reach the end of the partial dataset i want the database to return the next part of the dataset. My first guess would be to create a client cursor...
1
1243
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 question I have is within the Web.Config file. under <authentication mode="Forms"> there is "LOGINURL" because there is not a specific LoginPage I want the user to be redirected back to the requesting page they attempted the logjn from. Is...
1
2467
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
1400
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 sort of certificate with the request? Is this the certificate that is normally included in the browser? We are using a standard site certificate from Verisign (which resides on the server), what do I need to put in my client?
1
1568
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 system and then say I need to install some prerequisite stuff. So I click on the link that says that and then I get a message the that some application is already requesting a reboot. This is a brand new Compaq laptop purchased yesterday. I have...
3
3609
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 me the code to do this? Cheers
0
9081
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8975
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8931
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
6564
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5904
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4408
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4660
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3097
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 we have to send another system
3
2032
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.