Break down the URL from request.ServerVariables("URL")

Hello All;
As the title suggest, I need to break down the URL.

Lets say this is the URL

domain.com/something/else/50/page.asp

Now, I need to break down the URL, and get the /50/ from the string.
Any idea's on this one?

Thanks All
Carrzkiss
LVL 31
Wayne BarronAsked:
Who is Participating?
 
Scott Fell, EE MVEConnect With a Mentor DeveloperCommented:
<%
page = Request.ServerVariables("url")
arrPage=split(page,"/")
response.write arrPage(0)&"<br>"
response.write arrPage(1)&"<br>"
response.write arrPage(2)&"<br>"
response.write arrPage(3)&"<br>"
response.write arrPage(4)&"<br>"

%>
0
 
Wayne BarronAuthor Commented:
Thanks Padas.
It was weird, I had it set for the (3) and it picked up on the first one, so I had to set it for (5) in order to grab the number.

However, it works like a charm.
And I see that I am not the only one that is up late tonight..

have a good one Padas.
Carrzkiss
0
 
Wayne BarronAuthor Commented:
As always, great work, from a great coder and person.
Take care Padas.

Carrzkiss
0
All Courses

From novice to tech pro — start learning today.