Yesterday, I ran into a crazy problem: Migrating a Drupal 9 CMS website from our server to a customer's server resulted in broken SVG's and icon fonts. The admin menu icons were broken, the status page icons (admin theme) were broken, icon fonts on the page were broken...
I checked all possible causes for this like:
- Database encoding
- File encoding
- Response encoding
- Webserver configuration
- PHP Versions
But all was fine!
Finally, I uploaded one of the CSS files containing content: \e123 variables to our webserver and to the client's web server to compare the results. And I found two strange differences:
While on our web server the results were correct as expected:
Finally, the server administrator was able to find out the reason: On the web server firewall settings the "Rewrite URL" option was enabled, which caused these problems! After that was disabled, everything works fine!
To be honest, I didn't expect a firewall to cause such problems - really mad and time-consuming problem! Hope by blog posed saved you from that nightmare. Anyway, in most cases it might be more likely that such problems are caused by wrong file encoding like written in the beginning.