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
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
solution:
RewriteRule /(?!manager/|assets/)([^?]*)(?:\?(.*))? /index.php\?q=$1(?2&$2) [I,L]