Max Back-references [Answered]RSS

2 replies

Last post Jul 22, 2009 03:06 AM by AdamLock

  • Max Back-references

    Jul 21, 2009 10:12 AM|AdamLock|LINK

     Hi

    I need a rule to process 10 querystring parameters, but references only go from 0-9 - is there a way around this?

     

    My rule is:

     ^section/([_0-9a-z-]+)/([a-zA-Z0-9\s.\-]+)/([a-zA-Z0-9\s.\-]+)/([a-zA-Z0-9\s.\-]+)/([a-zA-Z0-9\s.\-]+)/([a-zA-Z0-9\s.\-]+)/([a-zA-Z0-9\s.\-]+)/([a-zA-Z0-9\s.\-]+)/(.*)/(.*)

     

    Rewrite to:

    section/default.aspx?cp={R:1}&cat={R:2}&band={R:3}&spec={R:4}&style={R:5}&fin={R:6}&gain={R:7}&edge={R:8}&price={R:9}&colour={R:10}

    Running this rule gives an invalid back reference error due to referencing {R:10}

     

    Any help would be appreaciated!

     

    Cheers

  • Re: Max Back-references

    Jul 21, 2009 01:40 PM|DanielVL|LINK

    1. Open a Command Prompt and execute:

        reg add HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\InetStp\Rewrite /v MaxBackReferences /t REG_DWORD /d 10

    2. Recycle the worker process.

    The maximum value is 31.

    Let me know if it doesn't work.

     

    Backreferences regex Redirect

    Daniel Vasquez Lopez
    IIS Team
  • Re: Max Back-references

    Jul 22, 2009 03:06 AM|AdamLock|LINK

     Thanks Daniel, works great, appreciate your time and your help.