I have webserver with nginx
.
In HTML pages, I have lots of urls like: köln.jpg, münchen.jpg, köln-münchen.jpg. I can not edit the pages.
However on the disk some files are stored as "koln.jpg" or munchen or koln-munchen.jpg. I can not rename the files.
I basically need if image file is not found, file to be look as follows:
ö -> o
ü -> u
ä -> a
also same for caps - Ä -> A etc.
At the moment I am thinking to implement simple PHP script
that doing this, if there is 404 error, using nginx
404 document
.
However I am thinking there might be easier way using nginx
rewrite.
This question is somehow related, but is not the same:
How to replace underscore to dash with Nginx