473,395 Members | 1,885 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

redirect based on URL entered

JR
I have a website that has some issues depending on what URL a user
uses. If they type in http://www.url.com it works fine. If they go
to http://url.com it has issues. This is the issue with two URL's on
the same IIS instance. How would you do the following?

if <URL entered to get here= "url1.com" go to http://www.url1.com
else if <URL entered to get here = "www.url1.com" go to http://www.url1.com
else if <URL entered to get here= "url2.com" go to http://www.url2.com
else if <URL entered to get here = "www.url2.com" go to http://www.url2.com

Again thinking some kind of asp/aspx page that needs to run in IIS.
Any ideas?

Thanks.

JR
Nov 18 '08 #1
2 1421
JR
Slight correction as this would endless loop:

if <URL entered to get here= "url1.com" go to http://www.url1.com/home2.asp
else if <URL entered to get here = "www.url1.com" go to http://www.url1.com/home2.asp
else if <URL entered to get here= "url2.com" go to http://www.url2.com/home2.asp
else if <URL entered to get here = "www.url2.com" go to http://www.url2.com/home2.asp
Nov 18 '08 #2
JR wrote:
I have a website that has some issues depending on what URL a user
uses. If they type in http://www.url.com it works fine. If they go
to http://url.com it has issues.
You need to state *exactly* what those issues are. We can't see your monitor
from here...
This is the issue with two URL's on
the same IIS instance.
I suspect that either you haven't set up DNS for both URLs or you haven't
set the host headers for both URLs in IIS.

Andrew
Nov 19 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: TG | last post by:
I have a validation form that must behave differently based on the results of a PHP validation check. I have a post command at the top of my form that calls itself. I don't leave the form when...
3
by: Hans | last post by:
Hi there, I have a number of domain names and they all point to the same IP address. I would like to redirect to a specific folder, based on the domain name used to access the site. For example....
6
by: Peter Row | last post by:
Hi, I am writing a DLL in VB.NET that implements IHttpHandler.ProcessRequest. This code calls a sub and I need to know if that sub did a response redirect or not. Specifically I need to know...
3
by: michael_vanommeren | last post by:
I have two web applications that I am working with and I am trying to do a Response.Redirect from one to the other. They are setup as separate web applications on the same IIS server. If I go...
2
by: lm247 | last post by:
Hi, I have the following script which processes the html form and inserts into 3 tables. How can I pass the value of the variable EDSID to the next page using response.redirect? Been trying to...
11
by: DavidOwens | last post by:
hey guys i have 5regions, and i would like to redirect a region manager to the region page of der choice. so say David Price wants to go to his region, which wouyld be region 2, so they...
1
by: drexcol | last post by:
I am a php newbie and am trying to write a script that will direct visitors to specific pages on my website based on which of several url’s they have entered (all are aliases of the main website)....
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am trying to set this up using asp code and IIS configuration. But it seems not working. Here it is the way I am doing. In IIS I set up a virtual directory with secure communication, I...
6
by: dragiton | last post by:
ASP Code Redirect Error Hello I recently relaunched a website containing asp code which used to work perfectly. However, after resetting up the SQL DB and trying to work out some site bugs I have...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.