• rahvee

    (@rahvee)


    When I create a new wordpress site, and I clone it from the production server to the development server (copy the filesystem, copy the database, edit wp-config.php to use the copied database), I can browse to http://prod.server.com and I can browse to http://dev.server.com, and they both work. I do not get a redirect to the canonical URL.

    I work at a university with hundreds of wordpress sites. Generally speaking, all of our production sites, if I copy them to a dev server, and browse to the dev server, then I get redirected to the canonical URL. We also have load balancers that perform status checks on servers, so they’re browsing to IP addresses directly via http://a.b.c.d. The load balancers seem to get redirected.

    I’m trying to understand (disable) how to control redirection to the canonical URL. I’m aware of “wp search-replace”, but that doesn’t help the load balancers, which are browsing to IP addresses instead of URL’s.

    Redirection to canonical URL is something we do at the load balancer, so ideally, I would like to 100% disable wordpress redirection to canonical url’s. Is there an environment variable I can set, or something like that?

    Why do some sites redirect and others not? There is no .htaccess (we’re running nginx). There is no Redirect module installed.

    Thanks…

The topic ‘Why sometimes redirect_canonical?’ is closed to new replies.