I have to redirect a domain to a subfolder using .htaccess. I have done this with
RewriteCond %{HTTP_HOST} ^(www\.)?domain\.de$ [NC]
RewriteRule !^domain\.de/ /domain.de%{REQUEST_URI} [L,NC]
This works for 90% of my site.
But I also have file reference like:
domain.de/templates/shaper_helix3/fonts/fontawesome-webfont.woff2%3Fv=4.3.0.html
The file exists in the filesystem with the filename:
fontawesome-webfont.woff2?v=4.3.0.html (including query string)
These files are currently not found (404).
If I manually remove the query string from the filename (e.g. resulting in fontawesome-webfont.woff2) I get a HTTP Code 200 (Found).
I have multiple files with said filename structure and can not "hardcode" them, because through updates and installation of additional modules via CMS I can not know, which files will exist in the future in the respective directories.
The reason for the files inlcuding a Query String / version in their names is cache busting.
How do I have to modify my rules, so that these files can also be found?