Modrewite ~ $_SERVER["REQUEST_URI"] ~ $_SERVER["PHP_SELF"]

Discussion in 'Apache' started by Colbyt, Mar 2, 2008.

  1. #1
    Nubish question but I can not find the answer anywhere.

    What affect if any will modrewrite have on the $_SERVER["REQUEST_URI"] and $_SERVER["PHP_SELF"] functions?

    The results of those functions is used internally within a couple of scripts.
     
    Colbyt, Mar 2, 2008 IP
  2. Cybernaut

    Cybernaut Peon

    Messages:
    408
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Example:

    Request: http://www.domain.com/path/15

    Originalnally,

    REQUEST_URI = /path/15

    After rewrite (lets suppose):

    REQUEST_URI = /path/index.php?page=15

    Now, php sees this:

    REQUEST_URI = /path/index.php?page=15
    PHP_SELF = /path/index.php
     
    Cybernaut, Mar 2, 2008 IP