What is the best way to MOD REWRITE this?

Discussion in 'Apache' started by schlottke, Dec 22, 2007.

  1. #1
    page.php?do=view&fileid=_filename

    to something cleaner...

    page/view/_filename

    The filename is the only part of the URL that is not a constant.

    Any help would be appreciated.
     
    schlottke, Dec 22, 2007 IP
  2. buldozerceto

    buldozerceto Active Member

    Messages:
    1,137
    Likes Received:
    43
    Best Answers:
    0
    Trophy Points:
    88
    #2
    RewriteEngine on
    RewriteRule ^page/view/(.*)$ page.php?do=view&fileid=$1 [QSA,L,NC]
     
    buldozerceto, Dec 22, 2007 IP
  3. schlottke

    schlottke Peon

    Messages:
    2,185
    Likes Received:
    63
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wonderful, thanks.. I forgot the () around the *... too much time in front of the computer screen today.
     
    schlottke, Dec 22, 2007 IP