In my project, my /PropertDetail.aspx can get 2 querystrings.
1st one for the PropertyId /PropertDetail.aspx?PropertyId=5
2nd one for the Language /PropertDetail.aspx?PropertyId=5&Language=2
EDIT: and this page can get one of them or can get both of them, so my rewriter rule needs to handle both of them
So, i have set these rules to web.config
<rewriter> <rewrite url='^(/.+(\.gif|\.png|\.jpg|\.ico|\.pdf|\.css|\.js)(\?.+)?)$' to='$1' processing='stop' /> <rewrite url='^/(.+)-(.+).aspx$' to='/PropertyDetail.aspx?PropertyId=$2' processing='stop'/> <!--http://localhost:1562/Harika-Gayrimenkul-5.aspx--> <rewrite url='^/(.+)-(.+)-(.+).aspx$' to='/PropertyDetail.aspx?PropertyId=$2&Language=$3' processing='stop'/> <!--http://localhost:1562/Great-Property-5-2.aspx--> </rewriter>
It is all OK if there is no Language querystring, but when there is a language querystring it gets the 3rd expression as the PropertyId instead of Language
How can i define these two rules for the same page ?
Thanks
Combined answer:
That’s working well now for many combinations:
returns PropertyId=555 and Language=12.
returns PropertyId=666.