views:

56

answers:

2

I don't know what changed in the past--this used to work:

Accessing a URL on my server like the following, doesn't work: http://www.domain.com/folder/file.php?variable=a&variable2=b

I'm getting a "Not found The requested address 406.shtml was not found on this server." message.

However, if I access this, it works: http://www.domain.com/folder/file.php

Adding the question mark after file.php is what makes it break. I have never experienced a problem like this before. At first I thought that .htaccess had something to do with it, but I know as a fact that it hasn't been edited at all in the past.

Any ideas? I'm using CakePHP, but I doubt that has anything to do with it; this has worked before. All suggestions are welcome!

EDIT: The /app/webroot .htaccess file has this:

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

</IfModule>

As far as I know, this hasn't changed at all, and the URL worked with this. The .htaccess file right under /public_html/ contains this:

RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www.domain.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
<IfModule mod_rewrite.c>
   RewriteEngine on


   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]


</IfModule>
+1  A: 

You've got an error in your apache config. It's attempting to give you the 406 error page, but can't find it. If you fix that you may get a more informative error.

This link may help you with the root of the problem: http://urbangiraffe.com/2005/08/20/mysterious-406-error/

It could also be caused by mod_security. If it's not your server you should ask your hosting provider.

bemace
Hey, I added that code to the .htaccess file to turn off mod_security, but that didn't solve the problem; I'm still getting the 406 problem. does that mean it's not mod_security? Any idea how to fix the 406 error page so that it could give me the problem? Thanks for your help.
This problem with the question mark in the URL isn't happening on other domains, I realized. Only on this one that I'm working with. Does that mean it's not something to do with mod_security?
Got my host to fix it. Indeed it was a mod_security problem, and they fixed it quickly because I told them it had to do with mod_security. Thanks a lot.
A: 

99.9% probability that this is being caused by a change in your htaccess file. Something is checking for a query string and redirecting to or trying to load a file that doesn't exist.

Citizen
Just added htaccess info to the original question. Care to check it?