index.php parameters

Discussion in 'PHP' started by UCDaZ, Feb 11, 2009.

  1. #1
    UCDaZ, Feb 11, 2009 IP
  2. wmtips

    wmtips Well-Known Member

    Messages:
    601
    Likes Received:
    70
    Best Answers:
    1
    Trophy Points:
    150
    #2
    Learn about rewriting urls with mod_rewrite.
     
    wmtips, Feb 11, 2009 IP
  3. joxtechnology

    joxtechnology Peon

    Messages:
    146
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    you can do this in the htaccess file. with mod_rewrite enabled
     
    joxtechnology, Feb 11, 2009 IP
  4. tihan

    tihan Active Member

    Messages:
    64
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    93
    #4
    Make .htaccess file:

    RewriteEngine on
    RewriteRule ^([^.]+)$ /post?id=$1
     
    tihan, Feb 11, 2009 IP
  5. UCDaZ

    UCDaZ Active Member

    Messages:
    180
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    53
    #5
    @tihan
    I added that in my .htaccess and it's still not forwarding.
    I'm testing it on my localhost.
     
    UCDaZ, Feb 11, 2009 IP
  6. Danltn

    Danltn Well-Known Member

    Messages:
    679
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    120
    #6
    Try it on a Linux server, and ensure the mod_rewrite httpd element is enabled.
     
    Danltn, Feb 11, 2009 IP