I want to implement url-rewrite into an webapplication with the urlrewriter.net module.
This is my scenario now (numbers are fictional): Browse.aspx?cid=9&countryid=85 (cid stands for category id)
Now I want something like this categoryname/countryname.html
So i figured this might work but it doesn't. Its my first time using this i must be missing something.
<rewrite url="~/(.+)/(.+).html" to="~/Browse.aspx?cid=$1&countryid=$2" />
Maybe I need to use the title instead of the id on $1 and $2 but then it would be a lot harder to query things i suppose? And it means alot of rebuilding in the application
Can someone please help me get my head together for this?
Kind regards and thank you for reading, Mark
It looks like your example would rewrite
~/9/85.html
intoBrowse.aspx?cid=9&countryid=85
I suspect you're looking for something more friendly.
To solve this, give some thought to how you will be generating the *.html URLs in your pages. You could embed the category and country names there, and then just ignore them when you do the URL rewriting.