Closed howdu closed 1 year ago
If the URL ends with a slash the explode contains an empty element at the end.
$segments = explode('/', ltrim($request->getPathInfo(), '/'));
Simple fix changing ltrim to trim
ltrim
trim
e.g: https://example.com/about-us/ VS: https://example.com/about-us
page-cache/about-us.html page-cache/about-us/pcindexpc.html
Nginx/apache will never read the latter.
Fixes issue: https://github.com/JosephSilber/page-cache/issues/35
If the URL ends with a slash the explode contains an empty element at the end.
Simple fix changing
ltrim
totrim
e.g: https://example.com/about-us/ VS: https://example.com/about-us
Nginx/apache will never read the latter.
Fixes issue: https://github.com/JosephSilber/page-cache/issues/35