wp-rocket
wp-rocket copied to clipboard
Replace slashes with dot to load correct configuration file if the website loads via reverse proxy
Description
Remove trailing forward slashes and backslashes if they exist and then replace slashes with dot.
Type of change
Bug fix (non-breaking change which fixes an issue)
Is the solution different from the one proposed during the grooming?
No grooming as it's a very small change.
How Has This Been Tested?
If the HTTP_HOST is www.example.com/blog/ then WP Rocket try to load the configuration file from www.example.com%2Fblog.php instead of www.example.com.blog.php.
Checklist:
- [x] My code follows the style guidelines of this project
- [x] I have performed a self-review of my own code
- [x] My changes generate no new warnings
- [x] Existing unit tests pass locally with my changes