Help needed for mod_rewrite / url rewrite expression

Discussion in 'Site & Server Administration' started by suraj_ajax, Dec 24, 2009.

  1. #1
    Hi

    i m newbie in URL rewriting.. frankly speaking i have no idea bout using regexp
    Here is what i want to do ..
    i want a url rewrite rule for

    www.mydomain.com/news/this is new title/1
    this shud call/go to
    www.mydomain.com/news/display.asp?id=1

    similarly
    www.mydomain.com/articles/this is article title/1
    shud call/go to
    www.mydomain.com/article/display.asp?id=1
    I guess. both the above patterns can be done in via one rule

    I will be using ISAPI_Rewrite Lite (FREE) add on for enabling my IIS server for IIS rewrite.. http://www.helicontech.com/

    This is sample rewrite url rule i got from the documentation .. hope this helps u
    RewriteRule (.*?\.asp)(\?[^/]*)?/([^/]*)/([^/]*)(.*) $1(?2$2&:\?)$3=$4$5
     
    suraj_ajax, Dec 24, 2009 IP