File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -283,10 +283,10 @@ private function _register_esi_actions()
283
283
if (!empty ($ _SERVER ['ESI_REFERER ' ]) && !$ this ->cls ('REST ' )->is_rest ($ _SERVER ['ESI_REFERER ' ])) {
284
284
self ::debug ('overwrite REQUEST_URI to ESI_REFERER [from] ' . $ _SERVER ['REQUEST_URI ' ] . ' [to] ' . $ _SERVER ['ESI_REFERER ' ]);
285
285
if (!empty ($ _SERVER ['ESI_REFERER ' ])) {
286
- $ _SERVER ['REQUEST_URI ' ] =
287
- substr (get_option ('permalink_structure ' ), -1 ) === '/ ' && strpos ($ _SERVER ['ESI_REFERER ' ], '? ' ) === false
288
- ? trailingslashit ($ _SERVER ['ESI_REFERER ' ])
289
- : $ _SERVER [ ' ESI_REFERER ' ];
286
+ $ _SERVER ['REQUEST_URI ' ] = $ _SERVER [ ' ESI_REFERER ' ];
287
+ if ( substr (get_option ('permalink_structure ' ), -1 ) === '/ ' && strpos ($ _SERVER ['ESI_REFERER ' ], '? ' ) === false ) {
288
+ $ _SERVER [ ' REQUEST_URI ' ] = trailingslashit ($ _SERVER ['ESI_REFERER ' ]);
289
+ }
290
290
}
291
291
# Prevent from 301 redirecting
292
292
if (!empty ($ _SERVER ['SCRIPT_URI ' ])) {
You can’t perform that action at this time.
0 commit comments