|
|
|
|
|
| | |
|
Active Server Pages help tutorial how to ASP Help ASP Tutorials ASP Programming ASP Code - ASP Free CJWSoft ASPProtect ASPBanner ASPClassifieds
(Advanced)
(Components)
(Database)
(General)
(Vbscript)

|
|
Subject: |
Re: Redirect based on URL typed by user.... |
From: |
Pete |
Date: |
2/22/1999 7:04:34 AM |
IP: |
193.133.140.50 |
Try this :
'Declare varibles
Dim UserURL
Dim NewURL
'Get info from editbox called URL on the last form
'Example input "Pete.hickson.com"
UserURL = Request("URL")
'Split the string up at "." returning all
'substrings (-1) using a textual compare (1)
UserURL = Split(UserURL, ".", -1, 1)
'UserURL(0) = "Pete"
'UserURL(1) = "hickson"
'UserURL(2) = "com"
'Redirect the user
NewURL = "http://www." & UserURL(1) & "." & NewURL = NewURL & UserURL(2) & "/" & UserURL(0)
'NewURL = http://www.hickson.com/Pete
Response.redirect NewURL
That should do it.
Pete
P.S. you can find the best VBScript site at http://msdn.microsoft.com/scripting/default.htm if you need a hand understanding the commands. |
Previous Message
Follow Up - Oops! - Pete 2/22/1999 7:09:49 AM
|
|
|
|
|
|
|
|
|
|
|
|