Helicon isapi rewrite 3 redirectcondition fails

359 views Asked by At

We have a url that makes use of a rewritemap to retrieve a parameter for the querystring in order to get the right themepage. This works wel and it shows the right themepage in the default language.

If a user wants to change the language of this thempage he will perform a redirect to the same url but a language parameter will be added to the url.

The problem is that it does not rewrite to the themepage but it gets rewritten to our homepage instead of the themepage.

A url like www.mysite.co.uk/theme/cars will be rewritten to www.mysite.co.uk/themepages/themepage.aspx?pgid=1

adding the language parameter : www.mysite.co.uk/theme/cars?lng=2 should redirect to www.mysite.co.uk/themepages/themepage.aspx?pgid=1&lng2 instead it is rewritten to the homepage. The url in the address bar is correct. So the rewriterule has to be incorrect.

This is part of my httpd.conf

<VirtualHost www.mysite.co.uk>
  RewriteEngine on 
  AllowOverride all 
  RewriteBase /
  RewriteMap thememap txt:C:\rewritemaps/redirectmap.txt [NC]
  RewriteCond %{QUERY_STRING} ^$ [OR]
  RewriteCond %{QUERY_STRING} ^lng=(.*)$  [NC]
  RewriteRule ^theme/([^?/]+)\.* /themepages/themepage.aspx?pgid=${thememap:$1} [NC,QSA,L]
</VirtualHost>

Does somebody have a clue why this happens ?

0

There are 0 answers