Regexing it up with IIS re-write module

Posted by Michael Jasper on Stack Overflow See other posts from Stack Overflow or by Michael Jasper
Published on 2011-02-15T23:21:58Z Indexed on 2011/02/15 23:25 UTC
Read the original article Hit count: 324

Filed under:
|
|
|

I am developing a profile-based web application where each user is assigned there own url through their username & iis rewrite mod's magic. A typical user's profile url would be http://www.mymark.com/mike

Each user is also created a blog in a multi-user wordpress installation. The wordpress url would look like this: http://www.mymark.com/blog/mike

I am trying to use the rewrite module to create more canonical urls for the user (http://www.mymark.com/mike/blog), and have tried several regex variations that I have created through RegExr(a regex generation tool) and come up with this as the pattern to match (www.|)mymark.com/([^/]+)/blog but haven't had any success so far. What am I doing wrong here?

Here is a screen shot of my re-write rule:

enter image description here

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about regex