123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computers >> View Article

How To Find The Current Url With Asp

Profile Picture
By Author: Sven Vdhrison
Total Articles: 3
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

The full URL to a page comes in three parts: The domain name, the path to the file then the filename, and the QueryString. For example, take the URL http://www.example.com/example/page.asp?name=Bob. The three parts of this are: The domain name: www.example.com
The path to the page: /example/page.asp
The QueryString: name=Bob So how do you find it all out with your own scripts? Well the following code should do it:
<%@language="VBScript"%>
<%
Dim strDomain, strPath, strQueryString, strURL
' find out the domain:
strDomain = Request.ServerVariables("HTTP_HOST")
' find out the path to the current file:
strPath = Request.ServerVariables("URL")
' find out the QueryString:
strQueryString = Request.ServerVariables("QUERY_STRING")
' put it all together:
strURL = "http://" & strDomain & strPath & "?" & strQueryString
Response.Write "The current URL is: " & strURL
%>

Total Views: 61Word Count: 141See All articles From Author

Add Comment

Computers Articles

1. Ssl/ Tls Security & Data Encryption Services
Author: brainbell10

2. Buy Laptop, Printers & Headphone Online In Pakistan
Author: jbsonline

3. How To Build A Personalized Gaming Computer For Maximum Performance?
Author: Jack Williams

4. Voice Ai For Customer Experience India | Ai Voice India | Ai Virtual Agent For Customer Service India
Author: Viva

5. Market Forecast: Customer Identity And Access Management
Author: Umangp

6. The Evolution Of Weapon Tracking In 2026: Smarter, Faster, And More Reliable
Author: TrackerIoT

7. Smarter File Management: How Rfid Is Changing The Way We Handle Physical Records
Author: TrackerIoT

8. France E-commerce Marketplace Data Scraping For Competitive Advantage
Author: iwebdatascraping

9. Manufacturing Identity Security Is No Longer An It Problem — It's A Business Risk
Author: Mansoor Alam

10. What Is Student Retention Software? A Complete Guide For Universities
Author: Brenda Joyce

11. Scrape Bookmyshow Data For Real-time Entertainment Insights
Author: iwebdatascraping

12. Hyderabad’s Best Barcode Printer Dealers For Retail & Warehouse
Author: prime pos

13. Roi Training Tools For Sales Teams: How Training Drives Performance
Author: Umangp

14. Melon Playground Game
Author: Melon Playground

15. Pincode Level Keyword Data Analytics From Zepto & Instamart
Author: Actowiz Metrics

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: