Apache appending .php extension?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
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!

Re: Apache appending .php extension?

raisins@gmail.com wrote:

Quoted text here. Click to load it


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?

Erwin Moller

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?

Re: Apache appending .php extension?

On 24 May 2006 10:26:16 -0700, raisins@gmail.com wrote...
Quoted text here. Click to load it

If you are opening "http://localhost/tag/" there's probably an index.php of
index.html file that's opening up as a result. May be worth scanning the home
page file in that directory to see if it may have code that sends it to another


Unlimited Newsgroup Downloads / $19.95 month  
More Details - http://newsguy.com/overview.htm

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!!

Re: Apache appending .php extension?

On Wed, 24 May 2006 20:54:09 -0700, raisins wrote:
Quoted text here. Click to load it

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


Adam Harvey

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

Re: Apache appending .php extension?

Adam Harvey wrote:
Quoted text here. Click to load it

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!

Site Timeline