Previous Next

Thread: IIS 6 Redirection Using Wildcards Question

Last post 11-01-2007 7:21 PM by micronovae. 3 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (4 items)

Sort Posts:

  • 11-01-2007, 9:38 AM

    IIS 6 Redirection Using Wildcards Question

    Hello,

    I have an old domain name (domain1.com) that I want to redirect (301) automaticaly to a new domain name (domain2.com).

    I tried to use IIS redirection. I have a web site that answers to every requests on a particular IP.  I wrote this as the redirection URL (with exact URL and permanent redirection options checked):

    http://www.domain2.com$V

     This is working fine. However, users can access domain1.com by using many different hosts (host1.domain1.com, host2.domain1.com) and no host at all (http://domain2.com) on either http or https protocol (so I don't want to hardcode http://www).

     I then look at wildcard redirection.  I tried this:

    *; *.domain1.com; $0.domain2.com$V

    It however doesn't work, I receive the "page not found" error. I thought that should work. Am I doing something wrong?

    I also tried two "URL Rewriters" (3rd Party - IIRF, ISAPI_REWRITE), but they seem to conflict with another ISAPI filter that I can't remove. This is why I'm trying to make IIS built-in redirection works.

    Can someone help?

    Thanks!

     

  • 11-01-2007, 4:13 PM In reply to

    Re: IIS 6 Redirection Using Wildcards Question

    Try IIS Mod-Rewrite.

    What ISAPI filter is the one that conflicts with URL rewriting filters?

  • 11-01-2007, 4:41 PM In reply to

    Re: IIS 6 Redirection Using Wildcards Question

    It's the WebSphere Application Server Plug-in.  It is used to have IIS answers all requests and forward .nsf requests to a Lotus Domino server installed on the same server (and to have single sign-on between MS Active Directory and Lotus Domino web applications).  It was conflicting with ISAPI_Rewrite for sure and maybe with IIRF (I still don't know why this one doesn't work... I haven't received any replies to my post on their forum)

    By the way, I saw your product (IIS Mod-Rewrite) and tried it before posting but I haven't been able to make it work... but I haven't tried hard since I was looking for a free solution (or a really small fee... we have lots of servers).  It looks cool though.

     Thanks!

  • 11-01-2007, 7:21 PM In reply to

    Re: IIS 6 Redirection Using Wildcards Question

    Thanks:-) 

    By the way, today we released IIS Mod-Rewrite 3.0 which is a lot better than its predecessor :)

    Your IIS setup is quite complicated. You can try play with filter priorities. At first level, IIS Mod-Rewrite and IIRF support changing priority (low, middle, high). The priority is changed through the applications and not through IIS Manager. At a second level, if both the rewrite filter and WebSphere plugin have the same priority (say both middle, or both high) then you can change the order they are called through IIS Manager (move higher or lower). ISAPI Rewrite does not allow changing priority. It's stuck to high.

    I know, it's a bit complicated and moving the rewriter priority higher does not guarantee that it will be called before WebSphere plugin. Priority matters only if the filters are called for the same notification type (we are getting too deep to explain). I cannot tell anything for the other filters, but IIS Mod-Rewrite Standard uses only the SF_NOTIFY_PREPROC_HEADERS for url rewriting which is a relatively early notification. IIS Mod-Rewrite Pro might cause complications because it also performs per-directory rewrites which are processed relatively late.

    No matter which rewriter you choose, I hope I was useful and you get the things working.

    Regards

Page 1 of 1 (4 items)
Page view counter