mod_rewrite help

Discussion in 'Apache' started by panchomendez, Oct 31, 2007.

  1. #1
    Guys,

    In my current structure I have www.mysite.com/games/newgame/br I would like when people go to

    new.mysite.com/games/newgame that it actually loads in the data from /games/newgame/br I would like to keep my directory structure the same and would like to accomplish this via mod_rewrite, let me know if this is possible and any examples that anyone might have.

    Thanks,
     
    panchomendez, Oct 31, 2007 IP
  2. evera

    evera Peon

    Messages:
    283
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #2
    RewriteEngine on 
    Redirect permanent ^/games/newgame/br http://www.mysite.com/games/newgame/
    Code (markup):
    Or with wildcard:

    RewriteEngine on 
    RedirectMatch 301 ^/games/newgame/(.*) http://www.mysite.com/games/newgame/
    Code (markup):
     
    evera, Nov 1, 2007 IP