WP in own directory causing "circular redirect" due to trailing slash difference
-
Using Facebook’s Object Debugger, I’ve found that Ographr outputs
og:url
as it is according to WP (without a trailing slash to prevent double-slash in permalinks). This causes a “Circular redirect path” and a discrepancy betweenog:url
andrel='canonical'
, at least if WP is in its own directory.Example:
WP/Site Address is "https://www.example.com/wp"
(in settings)
rel="canonical" is "https://www.example.com/wp/"
og:url is "https://www.example.com/wp"
The fix is to just append the trailing slash when outputting
og:url
ifis_front_page() || is_home() || is_404()
and trailing slash isn’t present.Thanks.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘WP in own directory causing "circular redirect" due to trailing slash difference’ is closed to new replies.