« Previous Next »

Thread: {R:1} Always returns default.aspx

Last post 06-14-2009 12:32 AM by MWeber. 2 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (3 items)

Sort Posts:

  • 05-30-2009, 11:32 AM

    • MWeber
    • Not Ranked
    • Joined on 03-23-2007, 3:12 PM
    • Pennsylvania
    • Posts 3

    {R:1} Always returns default.aspx

     Hello,

     1.) I am finding the module very buggy.  Both 1.0 and 1.1.  Sometimes when I write a rule and use "{R:1}" it returns "default.aspx".  That is a file that does not exist anywhere on my server or in any of my rules.  When I test the rule in IIS console it works fine.  It does not work in any browser though.  I know I am loading the correct URL in my browser because there is only one web site on my server, and some of the rules work.  So I know I am loading the correct URL.  The rewrite is triggered. However, I get a 404 because it is always using "default.aspx" instead of the value in R:1.

    2.) I used to have a application folder called "cart" with a file named "default.aspx" and I deleted it several days ago.  I restarted IIS and my server. Yet sometimes the rewrite rules will randomly try to redirect to a folder called "cart".  There is only one web.config on my server so there is no mistake.

    I have searched for other web.config files that may exist, but there are none.  I can not for the life of me figure out where IIS is getting their data from. 

    The "wizard" in IIS for testing rules works perfectly.   It just does not work when I load the URL in the browser.  So IIS seems to at least understand the rules somewhat.  It just doesnt work in the browser. 

    Does this make sense to anyone?   Is there some sort of cache somewhere?

  • 06-01-2009, 5:00 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 3:38 PM
    • Redmond, WA
    • Posts 661

    Re: {R:1} Always returns default.aspx

    May be the IIS default document interferes with the rule somehow? Can you try changing the default document configuration in web.config file as follows as see if that helps?

    <defaultDocument>
                <files>
                    <remove value="default.aspx" />
                </files>
    </defaultDocument>

     

    http://ruslany.net
  • 06-14-2009, 12:32 AM In reply to

    • MWeber
    • Not Ranked
    • Joined on 03-23-2007, 3:12 PM
    • Pennsylvania
    • Posts 3

    Re: {R:1} Always returns default.aspx

     I reinstalled it and it started to work.  It occasionally does it after add a new rule, however, if I restart everything it starts working normally again.  I am pretty sure it is a bug, but I am getting by now.  It works fine on the live server and that is most important.

Page 1 of 1 (3 items)
Microsoft Communities