mod_rewrite

Discussion in 'Apache' started by egdcltd, Apr 9, 2005.

  1. #1
    Can anyone recommend a really simple tutorial for using mod_rewrite to convert PHP URLs into static URLs?
     
    egdcltd, Apr 9, 2005 IP
  2. LGRComp

    LGRComp Well-Known Member

    Messages:
    516
    Likes Received:
    27
    Best Answers:
    0
    Trophy Points:
    195
    #2
    I found this to be a fairly easy tutorial to follow. It might help.

    http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html
     
    LGRComp, Apr 9, 2005 IP
  3. dustin

    dustin Peon

    Messages:
    69
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    dustin, Apr 9, 2005 IP
  4. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Thanks, but I am still having problems
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule article_(.*)\.html$ /more/article/article.php?id=$1
    RewriteRule search_(.*)\.html$ /more/article/search.php?cid=$1
    Code (markup):
    Now the first rewrite rule works fine, converting URLs from e.g. article.php?id=1 to article_1.html. The second rule doesn't do anything, and I can't figure out why
     
    egdcltd, Apr 10, 2005 IP
  5. WhatiFind

    WhatiFind offline

    Messages:
    1,789
    Likes Received:
    257
    Best Answers:
    0
    Trophy Points:
    180
    #5
    WhatiFind, Apr 11, 2005 IP
    miko67 likes this.
  6. egdcltd

    egdcltd Peon

    Messages:
    691
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thanks for the link.
     
    egdcltd, Apr 12, 2005 IP
  7. miko67

    miko67 Well-Known Member

    Messages:
    769
    Likes Received:
    59
    Best Answers:
    0
    Trophy Points:
    120
    #7
    miko67, Apr 12, 2005 IP