Mod_Rewrite Issues

Discussion in 'Apache' started by Synchronium, Nov 3, 2007.

  1. #1
    Hey,

    How could I write a RewriteRule to achieve the below problem:

    /blog/2007/11/ would redirect to say /blog.php?method=archive&year=2007&month=11

    And:
    /blog/alpha-neumeric_titles!/ would redirect to /blog.php?method=view&title=alpha-neumeric_titles!


    the method=view or method=archive would be hardcoded in the rule, not from $1 or anything.

    I hope that makes sense?

    Thanks if anyone can help. Rep will be given! :)
     
    Synchronium, Nov 3, 2007 IP