473,396 Members | 2,026 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

May 24 '06 #1
5 1915
ra*****@gmail.com wrote:
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!


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
May 24 '06 #2
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?

May 24 '06 #3
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!!

May 25 '06 #4
On Wed, 24 May 2006 20:54:09 -0700, raisins wrote:
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!!


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!

May 25 '06 #5
Adam Harvey wrote:

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

Adam

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!

May 25 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Terence | last post by:
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...
1
by: Ole Kramer, SFS GmbH | last post by:
We have installed PHP 5.0.1 on a Windows 2003 Server with IIS6 in ISAPI mode. The processing of .php files works fine with our basis version of the php.ini file. But, as soon as we edit the php.ini...
7
by: RC | last post by:
First, let me say I couldn't find a group discuss XML/XSLT. So I only choose the closest groups to post this message. Here is part of my *.xsl file <xsl:stylesheet...
14
by: Jim Carlock | last post by:
I have a couple easy questions possibly. 1) Is there a default.php page? The webserver seems to support default.htm, default.html, index.htm and index.html. It's an Apache server, I'd like to...
18
by: rfhurley | last post by:
How do I run a .php program? (I'm starting with the "hello world" script)
2
gauravgmbhr
by: gauravgmbhr | last post by:
hi m working with PHP and i wrote some Test cases for each of my function i want to follow the notation file name = name.php test file = name.phpt so i need to add new extension called...
6
by: MaiyaHolliday | last post by:
Hello, I've recently installed apache on a new computer, and cannot figure out why my site will not process any includes. (it was working on my old one) There are no errors on the page such as...
9
by: Christopher Koeber | last post by:
Hello, I am attempting to perform a PHP installation on an Apache 2.2.6 web server instance that is loaded on a Windows 2003 server operating system (R2 SP2). I have a third party application...
6
by: josequinonesii | last post by:
I've searched, I've read, I've tested and re-read numerous post but to no avail yet... Quite simply, the settings I've applied to my httpd.conf, httpd-vhost.conf and my hosts files simply does not...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.