WordPress redirecting connections on port 8080 to 80

I solved it!! here’s how:

Edit your current theme’s functions.php and add following line after the opening PHP tag to disable canonical redirection.

remove_filter('template_redirect','redirect_canonical'); save and exit.

Restart apache2 and nginx and check with curl -I IP.

Leave a Comment