Problems with $_GET

Discussion in 'PHP' started by proprod, Oct 7, 2007.

  1. #1
    Using something like blablabla.php?page=45 Getting page 45 is no issue. Where I'm having a problem is if I attempt to use mod_rewrite to get /page-45.html. The $_GET doesn't seem to be pulling the 45 anymore.

    Any suggestions?

    Thanks in advance.
     
    proprod, Oct 7, 2007 IP
  2. roosevelt

    roosevelt Active Member

    Messages:
    73
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    91
    #2
    Paste the rewrite rule code you used in your .htaccess. May be then we can sort out the problem.
     
    roosevelt, Oct 7, 2007 IP
  3. proprod

    proprod Active Member

    Messages:
    216
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    90
    #3
    RewriteRule (.*)fight-email-spam/page-(.*).htm[l]?$ fight-email-spam.php?page=$1 [QSA,NC]
    Code (markup):
     
    proprod, Oct 7, 2007 IP
  4. kkrizka

    kkrizka Peon

    Messages:
    223
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Try changing it to page=$2
    I think $1 will be whatever is in front of fight-email-spam page. Also make sure you have enabled mod_rewrite the module. :)
     
    kkrizka, Oct 7, 2007 IP