• Hi there,

    We seem to be having an issue with this page: https://slatediscounts.com.au/bluestone/pavers/ randomly creating a redirect chain from pages that don’t exist, to finally redirecting to a page that does exist (but is not the page in question, but more so this one: https://slatediscounts.com.au/pavers-brisbane/)

    What I have investigated so far:

    • Checked WordPress redirect plugins for conflicts
    • Examined .htaccess rules for manual 301 redirects
    • Investigated WordPress database(Checked the wp_options and wp_postmeta tables in the WordPress database to check for settings or redirects stored there, including serialized data)
    • Took the serialized PHP array and unserialised it, didn’t find anything
    • Analysed wp_redirect function
    • Disabled canonical redirects temporarily
    • Reviewed WordPress rewrite rules
    • Checked for PHP errors or logs
    • Debugged with WordPress debugging tools, which I can provide more info from if requested.
    • Used SQL queries to investigate and dig through the database

    The headers in the browser (Mozilla Firefox) also indicate that this redirect is powered by WordPress, but I haven’t been able to find exactly where this is occurring.

    The redirect chain is rather complicated, and starts off with requesting the actual URL (https://slatediscounts.com.au/bluestone/pavers/), then appends a /paver/ to the next URL until it finds https://slatediscounts.com.au/pavers-brisbane/ which I assume WordPress dictates is the “right” URL)

    Is there anything obvious, that would likely be causing this problem?

    Any help would be greatly appreciated.

    Thanks!

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hello,

    You should search for a conflict to determine where the redirect comes.
    As you can see on wp_redirect() , “WordPress” is the default parameter.
    https://github.com/WordPress/wordpress-develop/blob/4f02bc74e6895370969f1ec79d27edede6cb054d/src/wp-includes/pluggable.php#L1385
    This is the same for the other WordPress redirect functions.
    It means if a theme or a plugin do not customize this parameter, then the Browsers are saying t=it’s done by WordPress… which is not necessarily the truth.
    As far I know, only Polylang, Redirections and Yoast SEO are using this parameter which is useful for debug.

    To find a conflict:

    1. disable all your plugins, mu-plugins and active a TT1 theme
    2. Check you don’t reproduce the issue
    3. Activate your theme – redo step 2
    4. Activate a 1st plugin – redo step 2
    5. Proceed for each plugins until finding the conflict
    Thread Starter lperryau

    (@lperryau)

    Hi @sebastienserre ,

    Thanks for taking the time to reply back to me.

    I would assume with the wp_redirect hook, and that the browser headers indicate x-redirect-by-WordPress this would be the hook responsible for forcing the redirect, but you are saying this may not be the case?

    “As far I know, only Polylang, Redirections and Yoast SEO are using this parameter which is useful for debug.” I’ve gone through our list of plugins and we don’t use any of these. We use RankMath as the SEO plugin of choice, but I disabled the Redirections option on the plugin and we never specified redirects through this plugin either. I also checked the tables responsible for these redirections through PHPMyAdmin and the rows were empty.

    We are working during business hours, so I can’t troubleshoot the site as efficiently as I would like in terms of themes/plugins.

    Do you know if there is any specific debugging I can use regarding these:

    • redirect_canonical
    • template_redirect
    • wp_redirect

    I have all of the rewrites this site uses, but none of them appear to be relevant to how or why this page is being redirected. (I can paste the full list if needed)

    I would assume there is some specific problem with one of these causing issues.

    Thanks for your help so far!

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.