Support » Fixing WordPress » Disable automatic redirect to siteurl?

  • Resolved stefanminning

    (@stefanminning)


    Hi,

    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?

    Thanks,
    Stefan

Viewing 4 replies - 1 through 4 (of 4 total)
  • 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/www.mysite.com/wp-includes/functions.php 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.