Roland
Sun Mar 13 09:58:53 CST 2005
"Stimp" wrote in message news:slrnd38hkf.suu.ren@carbon.redbrick.dcu.ie...
:I want to automagically rewrite a url like:
:
: www.blah.com/index.asp?client=123
:
: to
:
: www.blah.com/jonnyD
:
: What's the best approach to this using classic ASP?
: Do I need a 3rd party component or can this be done using IIS?
: (don't mind paying for something if it works better)
sub getClient
dim dict, url
set dict = CreateObject("Scripting.Dictionary")
dict.Add "123", "jonnyD"
if dict.Exists(client) then
url = dict.Item(client)
Response.Redirect "/" & url
end if
set dict = nothing
end sub
http://kiddanger.com?client=123
I'm using my default document. In it I call the sub with:
dim client
client = Request.QueryString("client")
if client <> "" then
getClient
end if
HTH...
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp