apache 1.3.x and the php file extension

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Terence

    #1

    apache 1.3.x and the php file extension

    A curious observation:

    I have my apache web server configured for the PHP apache module to
    parse files ending in the .php extension.

    nothing unusual about that, but I also noticed that if I leave the file
    extension off completely, not only does apache map it to the
    corresponding php file, but it allows the php module to parse it
    accordingly.

    for instance...
    Lets say I have a file called foo.php in the document root. Normally, I
    could access it like so

    but as it turns out, I can also access it like so

    and I do not have any folders off the document root named "foo".

    I'm using apach 1.3.24 with PHP v4.3.2-RC1 running on windows XP pro SP1

  • Frank Passek

    #2
    Re: apache 1.3.x and the php file extension

    Hi Terence,

    that's Apaches multiview feature.
    See http://httpd.apache.org/docs/content-negotiation.html

    Cheers
    Frank

    Terence wrote:[color=blue]
    > A curious observation:
    >
    > I have my apache web server configured for the PHP apache module to
    > parse files ending in the .php extension.
    >
    > nothing unusual about that, but I also noticed that if I leave the file
    > extension off completely, not only does apache map it to the
    > corresponding php file, but it allows the php module to parse it
    > accordingly.
    >
    > for instance...
    > Lets say I have a file called foo.php in the document root. Normally, I
    > could access it like so
    > http://localhost/foo.php
    > but as it turns out, I can also access it like so
    > http://localhost/foo
    > and I do not have any folders off the document root named "foo".
    >
    > I'm using apach 1.3.24 with PHP v4.3.2-RC1 running on windows XP pro SP1[/color]

    Comment

    Working...