Solved

ASP vbScript GET variable from URL directory

Posted on 2011-02-25
2
581 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
2 Comments
 
LVL 13

Accepted Solution

by:
devlab2012 earned 347 total points
Comment Utility
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
Comment Utility
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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/Q_28455246.html)28455246) Here (http…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

744 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now