I am looking for a rewrite URL tag for such conversion
www.example.com/subject.aspx?subject=aa&page=1
to
www.example.com/subjects/aa/1
I tried to add 2 dollars but it showed error in visual studio and it does not let me compile the solution.
Try this:
<rewrite url="^~/subjects/([A-Za-z]+)/([0-9]+)$" to="~/subject.aspx?subject=$1&page=$2"/>