Solved

ASP vbScript GET variable from URL directory

Posted on 2011-02-25
2
590 Views
Last Modified: 2012-06-21
I don't even know where to start to give sample code, but basically I'm wondering if there's a way in asp, vbscript to have it when:

www.mysite.com/users/username is entered

the default file in the users directory can somehow request the last bit like

username = Replace(Request.ServerVariables("URL"),"/users/","")

Thanks

0
Comment
Question by:AlaskaGuide
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 13

Accepted Solution

by:
devlab2012 earned 347 total points
ID: 34987066
Do you mean to say that user will request a page with url like the following:
www.mysite.com/users/devlab2012

and the request will be actually processed by a file:
index.asp in the directory named "users". i.e. actual path will be:
www.mysite.com/users/index.asp
And the index.asp file will find the user name and process the request accordingly.

If this is the case, then you are talking about URL Rewriting, URL Redirection. Although not directly possible in classic ASP, but following blog post will give you some directions:
http://asp.johnavis.com/blog/default.asp?id=19

There is a simple IIS tool from Microsoft to control url rewriting at IIS level. It is "URL Rewrite 2.0". You can get more details at:
http://www.iis.net/download/urlrewrite
0
 

Author Comment

by:AlaskaGuide
ID: 34987470
Perfect!

I was thinking it would take some IIS work. Thanks I also needed to upgrade to IIS from 6 to 7.

http://www.microsoft.com/downloads/en/details.aspx?FamilyID=32c54c37-7530-4fc0-bd20-177a3e5330b7 
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is an addendum to the following article: Acitve Directory based Outlook Signature (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_24950055.html) The script is fine, and works in normal client-server domains…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …

691 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question