File exists, but returns 406 Not Acceptable

coffeebean

New member
Jan 10, 2007
244
6
0
Still getting my feet wet with Wordpress and Apache but this is a weird ass error that is driving me crazy.

I uploaded the jquery-cookie plugin to:
[mydomain]/wp-includes/js/jquery/jquery.cookie.js

The file is there; I can see it in FTP and in the cpanel file manager. But if I try to access it in the browser I get this 406 Not Acceptable error.

This is with the default Permalink settings, like /?p=123. If I switch to Custom Structure with /%postname%/ then when I request this file I get a 404 with the pretty 404 page.

I think it has something to do with the file encoding maybe. I can get to other .js files in the same directory just fine.
 


You could be triggering something in mod_security if you have that.

You can put this in your .htaccess file:
SecFilterEngine Off

It will turn off mod_security for your domain. If it works after that, you might want to ask about what you can do to get that fixed so you don't need to do that.
 
Thanks, I'd seen that and tried it but it didn't seem to help. Maybe b/c this is shared hosting? Anyway I was able to workaround it by renaming the file to jquery_cookie.js. Seems weird but it works.
 
Not really weird. I didnt even think of that but permissions on the system could easily cause the server to disallow something that is .x.y