Help please how I can re-write this

Discussion in 'Apache' started by PinoyIto, Oct 28, 2014.

  1. #1
    I have the following url
    listit.php?l=202-29&m=208&p=29-5

    I want to re-write it that will look like this
    list-202-29-208-29-5.html

    I tried the following code
    RewriteRule ^list-([0-9-]*)-([0-9-]*)-([0-9-]*)-([0-9-]*)-([0-9-]*).html  listit.php?l=$1&m=$2&p=$3 [L,NC]
    Code (markup):
    but does not work.. help please
     
    PinoyIto, Oct 28, 2014 IP
  2. PoPSiCLe

    PoPSiCLe Illustrious Member

    Messages:
    4,623
    Likes Received:
    725
    Best Answers:
    152
    Trophy Points:
    470
    #2
    Change the line to this:
    
    RewriteRule ^list-(([0-9]*)-([0-9]*))-([0-9]*)-([0-9]*)-([0-9]*).html$  listit.php?l=$1&m=$2&p=$3 [L,NC]
    
    Code (markup):
     
    PoPSiCLe, Oct 29, 2014 IP