Forum Moderators: open

Message Too Old, No Replies

Rewrite Rule

         

Carpy

10:26 am on Jan 13, 2006 (gmt 0)

10+ Year Member



How can I create a rewrite rule in .NET so:

/book1.aspx?ID=99
/book2.aspx?ID=123
/book3.aspx?ID=1

becomes:

/99/book1.html
/123book2.html
/1/book3.html

Im working on the lines of:

~/(\d)/detail\.html
~/(*).aspx?ID=$1

Is this totally wrong?
Can I use 1 rewrite rule to acheive all three URLS?

thanks

mrMister

11:20 am on Jan 13, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



RegEx: /book(\d+)\.aspx\?ID=(\d+)
Format String: /$2/book$1.html