PluginProbe
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript / 4.1.20
BerqWP – All-In-One Optimization for Core Web Vitals, Cache, CDN, Images, CSS & JavaScript v4.1.20
4.1.20 4.1.19 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.0.30 4.0.29 4.0.28 4.0.27 4.0.26 4.0.24 4.0.25 4.0.23 4.0.22 4.0.21 4.0.19 4.0.18 4.0.17 4.0.16 All 174 releases
← All changes | inc/common-functions.php +7 -0 4.1.18 → 4.1.20 View file →
@@ -195,8 +195,15 @@
195 195 return;
196 196 }
197 197
198 198 $request_path = parse_url($url, PHP_URL_PATH) ?? '/';
199 + $extension = strtolower(pathinfo($request_path, PATHINFO_EXTENSION));
200 + $allowed_extension = ['html', 'htm'];
201 +
202 + if (!empty($extension) && !in_array($extension, $allowed_extension)) {
203 + return;
204 + }
205 +
199 206 if ($request_path !== '/' && isset($configs['permalink_trailing_slash']) && $configs['permalink_trailing_slash'] !== null) {
200 207 $has_trailing_slash = substr($request_path, -1) === '/';
201 208 if ($configs['permalink_trailing_slash'] !== $has_trailing_slash) {
202 209 bwp_redirect_to_canonical_slash($configs['permalink_trailing_slash']);