#1
  1. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    335
    Rep Power
    246

    IIS7 Rewrite - what gives?


    I seem unable to find the rewrite rules.

    the IIS forum says they are in inetpub/wwwroot/web.config , but all that is in that is the perl extension mapping.

    I've created some rules via the GUI but they don't work.

    In IE9 the rule is appending the hostname twice or even 3 times to the URL and so the webpage won't load.

    Can someone please advise how you do simple redirection for mutiple host headers with the one rule for .co.uk -> .com and non-www -> www

    This was so easy in IIS6 , why does MS have break things that used to work?
    Free MP3 Dance Music Downloads

    To err is human; To really balls things up you need Microsoft!
  2. #2
  3. No Profile Picture
    Grumpier old Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jun 2003
    Posts
    14,439
    Rep Power
    4539
    I don't know anything about IIS rewrite rules, sorry.

    Please don't start multiple threads on the same subject.
    ======
    Doug G
    ======
    Bartender to Rene Descartes "have another beer?" Descartes: "I think not" and he vanished.
    --Alfred Bester
  4. #3
  5. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    335
    Rep Power
    246
    Sorry how is one thread on pattern matching and one on file location of config the same question?

    I don't know anything about IIS rewrite rules, sorry.
    hmm!
    Free MP3 Dance Music Downloads

    To err is human; To really balls things up you need Microsoft!
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    May 2004
    Location
    surfing the interwebz
    Posts
    2,410
    Rep Power
    2005
    Are you referring to this?
  8. #5
  9. Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2009
    Posts
    335
    Rep Power
    246
    Hi seak79,

    No that's HTTP Redirect, this is URL Rewrites.

    HTTP Redirect doesn't work anymore due to location of the web.config file and a cyclical loop causing a 'page cannot be displayed' issue when you point both host headers to the same folder path. (as you used to in IIS6)

    As an aside, why does MS force you to pick a folder path for the website anyway, when all you want is a host header redirect, which you would have thought they would have sorted in IIS7 , not make things worse!

    It's ok though, through that I found that the web.config is in the folder location of the website path not wwwroot as the IIS forum suggested.

    The other problem I have found, is even after removing all rewrites to try to work out what was going on, IE9 is still performing rewrite redirection.

    so it's not just the rewrite engine sending me on a wild goose chase but some bizzarre bechavior with IE9 and remembering settings that don't exist anymore.

    I booted into my XP VM environment and used IE8 and the redirection doesn't happen.

    So when I get 5 minutes to look at the rewrites again, I'll have to use XP/IE8 to test as IE9 is screwy, which our server support company has also confirmed.

    Never rains does it!
    Free MP3 Dance Music Downloads

    To err is human; To really balls things up you need Microsoft!

IMN logo majestic logo threadwatch logo seochat tools logo