redirect based on URL entered

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • JR

    redirect based on URL entered

    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.c om" 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.c om" go to http://www.url2.com

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

    Thanks.

    JR
  • JR

    #2
    Re: redirect based on URL entered

    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.c om" 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.c om" go to http://www.url2.com/home2.asp

    Comment

    • Andrew Morton

      #3
      Re: redirect based on URL entered

      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


      Comment

      Working...