Support » Plugin: OGraphr for WordPress » 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 between og:url and rel='canonical', at least if WP is in its own directory.

    Example:
    WP/Site Address is "http://www.example.com/wp" (in settings)
    rel="canonical" is "http://www.example.com/wp/"
    og:url is "http://www.example.com/wp"

    The fix is to just append the trailing slash when outputting og:url if is_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.