We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 22098
    • 218 Posts
    Hello,

    i have ModX running on an IIS6 box with Helicon’s ISAPI_rewrite. This works fine, but when i have to pass a second variable to the code it doesn’t work as expected..

    f.e. the page /location?locationid=12

    doesn’t work, it shows the homepage.

    this is my rewrite code:

    RewriteRule ^/(?!(?:manager|assets)/)(.*)(?:\?(.*))? /index.php?q=$1?2&$2: [I,L,U]

    it seems that on Apache the "?" sign is automatically rewritten to a "&" sign or something?

    Anyone any ideas about this?

    cheers! Olaf
      • 22098
      • 218 Posts
      is seems to have something to do with the fact that i changed this rule:

      RewriteRule /(?!(?:manager|assets)/)(.*)\.html(?:\?(.*))? /index.php?q=$1?2&$2: [I,L,U]

      and removed the "\.html" part.

      the rule above works fine when using .html suffix.. the changed rule without \.html doesn’t work anymore for pages with an additional URL parameter

      Olaf
        • 22098
        • 218 Posts
        solution:

        RewriteRule /(?!manager/|assets/)([^?]*)(?:\?(.*))? /index.php\?q=$1(?2&$2) [I,L]

        This discussion is closed to further replies. Keep calm and carry on.