im looking for a way to remove a string from the REQUEST_URI in the Vhost-Configuration when the URI matches a specific pattern, for example:
- Code: Select all
<LocationMatch "/en*">
SetEnv Request_URI "New Request-Uri without /en"
</LocationMatch>
<FilesMatch \.php$>
SetHandler "proxy:unix:/var/run/php/php7.2-fpm.sock|fcgi://localhost/"
</FilesMatch>
This code does not work (of course).
I just want to explain what i need:
My goal is, that when the URI matches an "/en" at the beginning of the URI, the new REQUEST_URI which PHP-FPM uses is without the "/en" at the Beginning of the Request-Uri.
Thanks for your help in advance