123 Eng

Engineering the engineers™

Latest Jobs   Forum Map



Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)


   Computer Science / IT






   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs



Terms of use

Displaying  Source Code(s)  


Domain Redirect


Description : This is a basic redirection script based on the domain name. It is usefull if you are hosting multiple sites from one IP address.

'Set up the redirect variables
Dim strURL 'This is the URL the user typed into the browser
Dim strSiteName 'This is the domain name
Dim intEPos 'This is the position of the remaining dot

strURL = Request.ServerVariables("HTTP_HOST")

intURLLen = Len(strURL)
If InStr(1, UCase(strURL), "WWW") > 0 Then
strURL = Right(strURL, (intURLLen - 4))
End If

intEPos = InStr(1, strURL, ".")

strSiteName = UCase(Mid(strURL, 1, (intEPos - 1)))

'Insert your site names in the Select Ca
' se statement below to
'replace the Your-Site, Your-Next-Site &
' Default-Site text.
'Feel free to add to the select case for
' additional sites.
Select Case strSiteName
Case "Your-Site"
Response.Redirect "http://www.Your-Site.com"
Case "Your-Next-Site"
Response.Redirect "http://www.Your-Next-Site.com/sitedir"
Case Else
Response.Redirect "http://www.Default-Site.com/home.html"
End Select


Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG