httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joshua Slive <jsl...@gmail.com>
Subject Re: [users@httpd] Content Negotiation and PHP
Date Wed, 13 Oct 2004 13:00:39 GMT
On Wed, 13 Oct 2004 13:21:01 +0100, Chris Simon <osian@zetnet.co.uk> wrote:
> I have web hosting with a company called 1&1, running Apache 1.3.
> Although their content negotiation appears to be working correctly for
> most files (.html, .jpg, .gif etc, and also language negotiation) I
> can't work out how to get PHP pages to negotiate.  I'm not getting any
> help from 1&1 - they won't give advice on user programming!
> 
> As far as I can see, all I should need to do is add the following to my
> .htaccess file (I obviously do not have access to the server config files):
> 
> AddType application/x-httpd-php .php
> Options +MultiViews
> 
> I've worked this out from searching on the web.  But I suspect this
> might only be for Apache 2?  I have Apache 2 at home and it works
> perfectly with the AddType directive in httpd.conf.
> 
> If I call up a file with the .php extension, the page is parsed correctly.
> 
> If a call it without the extension, then I want it to find the file
> *with* the extension.  But all I get is a 404 Not Found.

If you are really getting 404, then the problem is that your Options
directive is not applied in the correct place in the config file. 
See:
http://httpd.apache.org/docs/misc/FAQ.html#options

You may also be getting a "no acceptable variants" error, in which
case you should see:
http://tranchant.plus.com/notes/multiviews
which should work in 1.3, even though it says it only works in 2.0.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message