Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Redirect based on the address
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Redirect based on the address

 Post Reply Post Reply
Author
kcomer View Drop Down
Newbie
Newbie


Joined: 19 March 2003
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote kcomer Quote  Post ReplyReply Direct Link To This Post Topic: Redirect based on the address
    Posted: 19 March 2003 at 6:41am

How can I redirect based on the address the user requested. I have 2 websites that I would like to host under the same webspace. I have each in its own folder. I would like to write an if elseif statement to redirect based on the address the client used. I don't know ASP very well, but I do know other programming languages. I just need a quick solution until we can move these 2 sites to another provider. I've wanted to learn ASP, but haven't had time yet. I don't excpect someone to write the code for me but to point me in a good direction. I mostly do java, php and perl and don't even know where to start looking for ASP info.

Thanks,

Keith

Back to Top
fernan82 View Drop Down
Mod Builder Group
Mod Builder Group
Avatar

Joined: 17 November 2002
Location: United States
Status: Offline
Points: 362
Post Options Post Options   Thanks (0) Thanks(0)   Quote fernan82 Quote  Post ReplyReply Direct Link To This Post Posted: 19 March 2003 at 11:01am

Like this?

<%
If Request.ServerVariables("URL") = "http://site1.com" Then
Response.Redirect "/site1"
Else
Response.Redirect "/site2"
End If
%>

FeRnAN
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.