httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Simon <os...@zetnet.co.uk>
Subject Re: [users@httpd] Content Negotiation and PHP
Date Wed, 13 Oct 2004 13:23:12 GMT
Joshua Slive wrote:
> 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

Yep, it's definitely a 404.  Please try it at 
http://www.nantperis.org.uk/tt - but if you call it with 
http://www.nantperis.org.uk/tt.php then it works.  Note that Content 
Negotiation *is* working on the site because 
http://www.nantperis.org.uk/contact works, which is a html file.  And in 
fact the main URL http://www.nantperis.org.uk/ works and it's language 
negotiated as well - the filename is actually index.html.en and 
index.html.cy.  It's only the PHP negotiation that doesn't work.

I've read the link you gave but it only applies I think to Options 
directives that are "absolute".  I have a plus character before the 
MultiViews parameter which makes it "relative" so that all the other 
options don't get reset. My .htaccess file is simply the two lines I 
gave before:

Options +MultiViews
AddLanguage en .en
AddLanguage cy .cy

I've tried adding the AddType directive but this causes both URLs (with 
and without the .php extension) to produce a browser dialog asking me to 
download a file of type application/x-httpd-php instead of rendering the 
page.

I've tried the fix on the other link you gave:

Replace the AddType line with:

AddHandler php-script php
AddType text/html php

This causes the Content Negotiation to work and the file to be found, 
but it's parsed as HTML and the PHP bits are ignored.

Does this point towards the web host's configuration being wrong?

-- 
Chris Simon
   osian@zetnet.co.uk
   http://www.users.zetnet.co.uk/csimon/



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