Mr2001 Posted February 15, 2008 Share Posted February 15, 2008 I'm stumped here... I'm running Apache 2.2 on SuSE. It's somehow automatically adding the .php or .cgi extension when I leave it off the URL, but I don't want this to happen. That is, if I request "/contact", and I have no such directory or file called "contact" but I do have /contact.php, then the server translates my request to /contact.php. Naturally this breaks all the relative links in that page when the request is actually something like "/contact/main.php". It's a problem because I'm rearranging the site and I actually have links like this that should be broken but are returning content instead, with incorrect relative links. (I can turn off AcceptPathInfo, but the server still accepts "contact" for contact.php.) As far as I can tell, I don't have any mod_rewrite rules set up, so I can't tell where this "feature" is coming from or how to turn it off. The only clue is that this translation happens for .php, .cgi, and .html, but not .shtml... and I get a "Content-Location" header in the HTTP response showing the correct filename where the content is actually stored. Quote Link to comment Share on other sites More sharing options...
powerspike Posted February 15, 2008 Share Posted February 15, 2008 Maybe it has something to do with mod negotiate or mod spelling (not sure if those are the current names) - check and see if they are enabled, and if they are - try disabling them and see if that fixes it. Quote Link to comment Share on other sites More sharing options...
Mr2001 Posted February 16, 2008 Author Share Posted February 16, 2008 Thanks, disabling mod_negotiation fixes the problem. According to the docs, the MultiviewsMatch directive controls this behavior of mod_negotiation. With "MultiviewsMatch NegotiatedOnly" set, it shouldn't be doing this, as far as I can tell, but it still is. Guess I'll just leave the module disabled. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.