IIS ASP - grab ID# from address bar

This is Interesting: Free IT Magazines  
Home > Archive > IIS ASP > May 2007 > grab ID# from address bar





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author grab ID# from address bar
Joey

2007-05-25, 1:18 pm

I bet this is a simple one, but I just don't know.

www.mydomainname.com/12345

How do I grab the 12345 in my ASP page as the ID#?





*** Sent via Developersdex http://www.codecomments.com ***
Joey

2007-05-25, 1:18 pm



Ok, I pressed SUBMIT too quickly.

So, I need to know how to grab 12345 if someone goes to
www.mydomainname.com/12345. I also need to know what ASP page to create
since there is no .asp at the end of the address bar. Is this is custom
404 page?


*** Sent via Developersdex http://www.codecomments.com ***
Evertjan.

2007-05-25, 1:18 pm

Joey wrote on 25 mei 2007 in microsoft.public.inetserver.asp.general:

> Ok, I pressed SUBMIT too quickly.
>
> So, I need to know how to grab 12345 if someone goes to
> www.mydomainname.com/12345. I also need to know what ASP page to create
> since there is no .asp at the end of the address bar. Is this is custom
> 404 page?
>


Yes, you can use 404.asp if set in IIS,
and if /12345 does not exist as a directory:

<%

qstr = Request.ServerVariables("HTTP_REFERER")

if instr(qstr,":80/12345/")>0 then
server.transfer "/mySecretDirectory/12345page.asp"
end if

%><html>

<head>
<title>404 - </title>
</head>

<body>
<h1>this is the 404 page</h1>
..............

--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com