Tuesday, October 7, 2008

Free Script Redirect Domain

<%@ Language=VBScript %>
<%
' Set up your variables
Dim sURL, sPath
' Get the domain name typed in the brows
' er.
sURL = Request.ServerVariables("HTTP_HOST")
' Get the rest of the path after the dom
' ain name.
sPath = Request.ServerVariables("PATH_INFO")
' Based on the domain name, redirect the
' user
' to the correct directory and attach th
' e rest
' of the path.
Select Case sURL
Case "www.maindomain.com", "maindomain.com"
' Ignore...this is the current site.
Case "www.domain2.com", "domain2.com"
' redirect To the "domain2" directory
Response.Redirect "domain2" & sPath
Case "www.domain2.net", "domain2.net"
' redirect to the "domain2net" directory
'
Response.Redirect "domain2net" & sPath
End Select
%>

enjoy it.

3 comments:

  1. Hello, Neat post. There's a problem together with your site in internet explorer, might test this? IE still is the marketplace chief and a good section of other folks will pass over your wonderful writing due to this problem.
    My blog post football news west ham

    ReplyDelete
  2. Appreciation to my father who informed me regarding this website, this website is
    actually amazing.
    Look into my blog ; pizza games st louis

    ReplyDelete
  3. Hi there! I just wanted to ask if you ever have any problems with hackers?
    My last blog (wordpress) was hacked and I ended up losing
    a few months of hard work due to no backup. Do you have any
    methods to stop hackers?

    Feel free to visit my web-site :: bridal makeup

    ReplyDelete