?
Solved

ASP vbScript GET variable from URL directory

Posted on 2011-02-25
2
Medium Priority
?
592 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 1388 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

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

In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

801 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