Can CakePHP and apache mod_speling co-exist in the same website?
A customer’s site runs on CakePHP. In webroot they have an unconnected, static folder of files that can be download directly bypassing Cake with a URLs like…
http://test.com/downloads/myfile1.txt
http://test.com/downloads/myfile2.txt
etc
These URLs are accessed by external software. This all worked fine.
However they have now replaced the old static files with new ones but have changed the case so myfile1.txt has become Myfile1.txt
Unfortunately the external software is still requesting the old filenames. CakePHP shows this as a 404 error.
This affects many thousands of files, they are trying to avoid renaming them all. It was suggested that the mod_speling apache module be added to sort this.
I have added and configured it but with no success. When a file like myfile1.txt (which no longer exists) is requested it is still grabbed by Cake as a 404.
I’ve tested mod_speling on an non-CakePHP site on the same server and it works fine, so we’ve got it installed and running properly. It seems Apache does a 301 redirect from the requested file Myfile1.txt abnd serves myfile1.txt
So my conclusion is that having mod_speling redirecting and CakePHP working in basically the same way these two cannot run together on the same site.
Does anyone know for sure? Am I trying to do the impossible or is it likely I’ve just made an error somewhere?