Support » Fixing WordPress » Disable automatic redirect to siteurl?

  • Resolved stefanminning



    I just upgraded to WP2.3 and everything went smooth, except that now my site redirects to what I have set in siteurl no matter what domain is actually called. I use one install of WP to output my site in several languages, and depending on the domain I choose which language to serve to the user… of course now they all get English, because that’s where WP2.3 sends them to.
    Any ideas how I can disable this otherwise useful feature?


Viewing 4 replies - 1 through 4 (of 4 total)
  • Moderator Samuel Wood (Otto)

    (@otto42) Admin

    remove_action('template_redirect', 'redirect_canonical');

    Add that to your theme’s functions.php file. That disables the canonical redirection.

    Thanks, that did the trick!

    Hm, doesn’t seem to work for me. Is there something else to do?

    Edit: Sorry, caching problem… Works.

    Hey Otto; this doesn’t seem to be working for me – I am adding your suggested code to the first line after <?php in my functions.php file in the wp-includes folder. When I do this I get an error msg for all pages:

    Fatal error: Call to undefined function remove_action() in /u/m/acct/ on line 4

    What am I doing wrong?

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Disable automatic redirect to siteurl?’ is closed to new replies.