mod rewrite help, next level.

Discussion in 'Apache' started by GotSkillz, Aug 8, 2008.

  1. #1
    Ok so I got an arcade site, and I got mod rewrite to work.. if i want things simple that is.

    so instead of URL/Arcade?play=filename it re directs to URL/arcade/play/filename.html

    Well in order to compete with the other arcades, i need to rewrite it to something like this..

    URL/arcade/play/game-name.html

    NOTE: I am unable to change the file names due to the script relying on those names for the inputation of high scores.

    Naturally I know that the game name will have spaces in it, so i will str replace spaces with hyphens, but how do i get it to where I can have the game name redirect it to the gamefile.

    I am almost there, i am just climbing over the hardest part of the mountain, and advice would be greatly appreciated.
     
    GotSkillz, Aug 8, 2008 IP
  2. pr0t0n

    pr0t0n Well-Known Member

    Messages:
    243
    Likes Received:
    10
    Best Answers:
    10
    Trophy Points:
    128
    #2
    Can you show any example for matching filename and game-name ? Is there any pattern?
     
    pr0t0n, Aug 9, 2008 IP
  3. GotSkillz

    GotSkillz Active Member

    Messages:
    101
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    51
    #3
    I'm not sure what your asking for, but in the script when a game is displayed it connects to the mysql database. there is a table in there that stores all the game info. There is a column for 'filename' and a column for 'gamename'. When MYURL/Arcade?play=FILENAME it pulls the filename, and then from the database where get[play] = filename it pulls the other data 'gamename' and displays it on the page.
     
    GotSkillz, Aug 9, 2008 IP