I'm having a little problem. I need serve files with case insensitive for a folder, i use nginx:

Original: https://example.com/media/catalog/product/b/t/bt2501_brandy.jpg https://example.com/media/catalog/product/p/r/PR3027GUN_1.JPG

This picture above would works with this way (case insensitive): https://example.com/media/catalog/product/b/t/BT2501_BRANDY.jpg or https://example.com/media/catalog/product/b/t/bt2501_Brandy.jpg or https://example.com/media/catalog/product/b/t/bt2501_Brandy.JPG https://example.com/media/catalog/product/p/r/pr3027gun_1.JPG

Some idea for me?

I know linux is case sensitive. But i can deal with this with nginx?


  • not sure about nginx, but with apache mod_spelling can help wtih case sensitivity issues – ivanivan Oct 11 '18 at 12:50
  • 1
    mod_speling is also a horrible security hole. The proper solution would be to fix the links in the CMS. – Gerald Schneider Oct 11 '18 at 12:51
location ~* ^/media/catalog/product/ {
    # The tilde and asterisks ensure that this location will
    # be matched case insensitive. nginx does not support
    # setting absolutely everything to be case insensitive.
    # The reason is easy, it's costly in terms of performance.
  • I'm not quite sure how this helps on matching paths on the filesystem. AFAIK the location directive is only for configurations in that path, isn't it? – Gerald Schneider 14 hours ago

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.