Apache appending .php extension?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • raisins@gmail.com

    #1

    Apache appending .php extension?

    This is kind of an obscure question, and I hope someone has a clue
    what's going on.

    I've got PHP4 running on Apache 1.3 on win32, and whenever I request a
    URL like so:

    It appears that the server is actually calling the script
    http://localhost/tag.php (which is a real file). However, when I do
    something like

    Apache does not try to serve up anything at all. The behavior of
    treating /tag/ like /tag.php is really screwing up my attempts to do
    RewriteRule matching. Please help!

  • Erwin Moller

    #2
    Re: Apache appending .php extension?

    raisins@gmail.c om wrote:
    [color=blue]
    > This is kind of an obscure question, and I hope someone has a clue
    > what's going on.
    >
    > I've got PHP4 running on Apache 1.3 on win32, and whenever I request a
    > URL like so:
    > http://localhost/tag/
    > It appears that the server is actually calling the script
    > http://localhost/tag.php (which is a real file). However, when I do
    > something like
    > http://localhost/nonexistantfile/
    > Apache does not try to serve up anything at all. The behavior of
    > treating /tag/ like /tag.php is really screwing up my attempts to do
    > RewriteRule matching. Please help![/color]

    Hi,

    My guess is that your RewriteRule's are causing this problem.
    Under 'normal' apache installation, this doesn't happen.

    Try to remove your extra rules, make a plain entry in conf for your site,
    reload Apache gracefull, and retry.
    Does it still happen?

    Regards,
    Erwin Moller

    Comment

    • raisins@gmail.com

      #3
      Re: Apache appending .php extension?

      Thanks for the response. I have tried commenting out all my Rewrite
      directives (I have checked .htaccess and httpd.conf), and this is still
      happening. It seems crazy. Is there some other file I can check maybe?

      Comment

      • raisins@gmail.com

        #4
        Re: Apache appending .php extension?

        I have checked that too -- there is no /tag/ directory (or redirect or
        anything) -- and the problem occurs for any file, e.g. if I access
        http://localhost/privacy/ it pulls up http://localhost/privacy.php, and
        there is definitely no /privacy/ directory!!

        Comment

        • Adam Harvey

          #5
          Re: Apache appending .php extension?

          On Wed, 24 May 2006 20:54:09 -0700, raisins wrote:[color=blue]
          > I have checked that too -- there is no /tag/ directory (or redirect or
          > anything) -- and the problem occurs for any file, e.g. if I access
          > http://localhost/privacy/ it pulls up http://localhost/privacy.php, and
          > there is definitely no /privacy/ directory!![/color]

          Do you have MultiViews and/or mod_negotiation switched on in Apache? My
          recollection is that it can have similar effects to this.

          Adam

          --
          Adam Harvey

          To e-mail: don't make an example out of me!

          Comment

          • raisins@gmail.com

            #6
            Re: Apache appending .php extension?

            Adam Harvey wrote:[color=blue]
            >
            > Do you have MultiViews and/or mod_negotiation switched on in Apache? My
            > recollection is that it can have similar effects to this.
            >
            > Adam
            >[/color]


            I don't want to overstate this, but you are a genius. Multiviews was
            turned on for the base directory, and disabling it has solved my
            problems. I definitely would not have found this on my own. Thank you!

            Comment

            Working...