help with mod rewriting with specific guidelines

Discussion in 'Apache' started by matanoosh, Jan 12, 2008.

  1. #1
    Hello everyone.
    I couldn't find the exact answer on similar threads; Apologies if the topic has been discussed too much before.

    I'm trying to use mod rewrite to achieve the following outcome:

    1. Current situation:
    page URL: www.MyDomain.com/Football.html
    /images
    /includes
    both directories above reside on the web root directory. all references to them from football.html are relative (i.e. /images/pic.gif or /includes/header.html)

    2. Desired situation:
    page URL: www.MyDomain.com/Games/Football

    /images
    /includes
    remain in the place.
    all relative links within the page should still point to www.MyDomain.com/link.html and NOT MyDomain.com/Games/Link
    (check out www.Backgammon.Org for the solution I'm after).

    Obviously, a single RewriteRule didn't do the job for me.
    Guys, I need your help. It's way over my head. How can I solve it?
    (check out www.Backgammon.Org for the solution I'm after).

    Thanks in advance.
     
    matanoosh, Jan 12, 2008 IP
  2. RyanDoubleyou

    RyanDoubleyou Peon

    Messages:
    86
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    What if you try:

    RewriteRule ^Games/Football?$ /football.html
    Code (markup):
    And you keep all of your links the same, since you want the other links to go to game.html
     
    RyanDoubleyou, Jun 8, 2008 IP