I´ve got this membership section for one of the sites that I´ve done. It allows you create a profile along with an image. It also gets displayed on another site on another server that shares the database. Instead of creating two copies of the image on both web servers I just went and linked one to the other.
As usual I named the images based on the ID number of the profile in the database. I then noticed a problem with a few of the profiles. Since the images are optional some of them didn´t have one on the server. The problem was that when the profile on the second server checked to see if a profile image existed on the first server, if there wasn´t one but there was a profile ID number that was similar then this image was getting displayed instead.
Very strange problem that needs sorting out pronto… I did some checking and by firing a request for the non-existant image with Wget at the server I found out it was giving me a "301 Moved Permenantly" response. I tried looking through some of the server logs and Apache httpd.conf files but couldn´t find out much more.
Next step, load up Google and go into research mode. After a couple of hours I found out that it was the Apache module mod_speling which very helpfully (although not in this case) rewrites misspelled URLs. After finding this the solution was simple: just create a .htaccess file in the image directory that contains the line "CheckSpelling off". Sorted.