WordPress: Disable automatic redirect. Site on separate ports (Nginx+Apache: 3080/3081)

You can turn off canonical redirection by putting this into your plugins directory:

/*
Plugin Name: Disable Canonical URL Redirection
Description: Disables the "Canonical URL Redirect" features of WordPress 2.3 and above.
Version: 1.0 
Author: Andrei Volkov
Author URI: http://upwork.link
*/ 
remove_filter('template_redirect', 'redirect_canonical'); 

From http://txfx.net/files/wordpress/disable-canonical-redirects.phps.
This should turn off that feature. Whether or not your setup will work as you need is another thing.
FINALLY: You want to run your wordpress installation at yourdomain.com/index.php but also want to use yourdomain.com/index.html. Both of these URLs should work at the same time and there should be no redirect from index.php to index.html.

Here are the steps for newbies:

  • Open your site with an FTP program
  • navigate to /wp-content/plugins/
  • create a new folder of any name
  • create an index.php and put the PHP code above and copy to your new folder
  • visit your wordpress backend and activate this new plugin
Scroll to top