I mentioned this over at webdeveloper.com a while ago, and it’s still an issue that I’m running in to.

Apache error_logs are showing quite a lot of “file does not exist” errors for pages using rewrites. For example, you could visit “http://www.mydomain.co.uk/product/103697.html” and the error log would show “http://www.mydomain.co.uk/product” with the file does not exist error.

Fine (I thought) as the referrer is the page, it must be that there is a broken link.

No such luck – no broken links on the page, and seemingly nothing wrong. In fact, while I’m looking at the specific site that I noticed the issue on first, it appears that I’m not affecting the error_logs at all. None of my browsing is causing errors.

So, I switched to the access_logs and started looking for times & dates of the errors. Turns out, all users were using IE8.

Cutting a long story short, I figured out – by looking at the number of errors that would appear on each page request – that the issue had something to do with Javascript includes on the page.

All the javascript pages were referenced in the header include file as relative i.e <script type=”text/javascript” src=”js/monkey.js”></script> There has never been an issue with this – until now – and specifically with IE8.

I do seem to remember something about the new rendering engine in IE8 parsing the page several times to pull in content I don’t see how a browser rather than an specific action could be causing an Apache error.

To fix the issue, making the javascript files “more” relative cured the problem. Altering the source to “/js/monkey.js” fixed the issue.

To be honest, it’s got me stumped. Can anyone shed any light on this?

Image Credit: Nicholas_T