Reputation: 2220
Codeigniter shows an 404 error page, for a javascript file. The file is in a js
folder. The file in question is jquery.cookie.js
.
If I change the filename, then I can access the file.
There are no route settings or .htaccess rules for the file, but for some reason codeigniter is showing its default 404 page when the javascript file is accessed.
Upvotes: 0
Views: 526
Reputation: 2220
Ok, finally figured out what the problem was. Any file that has "cookie" in its filename was blocked by mod_security on our server.
Upvotes: 0
Reputation: 5685
I've had this problem before - the problem stems from CI's well intentioned security system that looks for certain malicious strings. I never tracked down exactly where it does it, but if a JS file name contains ".cookie" it'll be denied by CI's internal filter.
The quick fix is to just rename the file to not include the word cookie, or change the .
in the filename to a _
.
Upvotes: 1