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
.
Related Posts:
- 301 Redirect Loop www to non-www – Nginx + Apache2
- How to configure nginx to redirect requests to the uploads directory to the production server?
- Exclude a path from WordPress using .htaccess redirects (Apache)
- How to setup 301 redirects for multiple query string URLs?
- WordPress site redirects to different wordpress domain on the same server after reuploading db backup
- WordPress redirect loop on nginx + apache reverse proxy
- 302 redirect to signup with nginx reverse proxy
- WordPress redirecting to 127.0.0.1 when accessing the site from a remote device
- Infinite loop behind SSL proxy on non-standard port
- Redirect from home page to post list page?
- Site loads very slowly (4-5 minute load time)
- I get redirected too many times only in wp-admin?
- 301-redirect directives for blogger to wordpress migration
- Redirect – remove custom query string
- Blog has an infinite redirect loop
- How do I do a redirect to WordPress permalink with post id via htaccess?
- How to redirect only 404 pages with htaccess in WordPress
- Moving wordpress to different url/server creates redirect loop
- I have cloudflare flexible enabled, How to redirect to https for Nginx server
- How to block direct access to files upload in edd folder
- Can I redirect the http request towards an old folder to the homepage using .htaccess file? [closed]
- How can I use an .htaccess file in Nginx?
- Cant login to wp-admin (redirecting to homepage), But CAN login to wp-login.php
- Site redirects to wrong url when saving settings
- Redirect blog page to latest post?
- Links to an exisiting Page are now redirecting to a draft page?
- Random and Erroneous WordPress Redirect
- Redirect Old domain & posts to new domain homepage
- Redirecting users to referrer page after logging in using custom login form
- add_rewrite_rule to pass entire path as a single parameter
- What is the wordpress way of displaying local external content?
- htaccess redirect dynamic posts
- RedirectMatch and Redirect interfering with each other
- Redirect all pages to homepage but still allow dashboard
- Return to where the user was, after log out
- Change ‘Back To Website’ link in wp-login.php
- How do I map a subdomain in wordpress to the primary domain in a multisite setup?
- htaccess rules not applied?
- Load time cost of using a redirect plugin v direct .htaccess entry
- Intercept the “lost password” action by first redirecting to an existing instructions page
- How to pass email values from one php page to another
- How to include error message on login
- WooCommerce unexpected behavior [closed]
- Force WordPress to load from site’s hostname
- 301 redirection editing .htaccess doesn’t work
- Redirect custom post type from one domain to another domain
- How can I force the user to log in, even if they’re already authenticated?
- Stop Redirecting to and from www
- How to pass a message using template_redirect
- Disable WordPress URL auto complete
- Redirect Main Home Page url to category URL without plugin
- W3 Cache redirects to front page when I press purge all caches
- Stop forcing certain paths to end with a forward slash
- Force 404 redirect to home?
- Is it possible to wp_redirect() to a new tab?
- Redirection on Custom page
- How do I redirect users after submitting a topic for moderation?
- Direct iPhone visitors to different stylesheet?
- How to delete a post and keep its slug to refer to another post
- 301 redirect any RSS feed on level up url
- Dynamic 404 page content while still keeping 404 status code?
- Redirect loop with similar URLs
- Why does WP HTTP API switch the method (POST/PURGE) to GET when redirecting (302)?
- Redirect user to specific link after login
- 301 redirect via htaccess rules on the new site
- WordPress Domain redirects to different host
- Change the domain url?
- Change Category Slug Redirection
- custom login form redirect problem
- Trying to re-direct users to specific page based on an ACF variable
- wp_redirect is only working in Chrome Network, page is not redirecting
- Open wordpress page in directory the way index.html would open
- How to remove redirection
- WordPress on Ubuntu – “File not Found” for home.php – Trying to Redirect to Root Folder
- Redirect Homepage to another page when user login
- Determine user destination on wp-login.php
- Disable WordPress URL auto Redirect
- Toggle Redirect Function On/Off With Checkbox
- My wordpress site has “https://” on it but when I go to Dashboard and click visit site, it removes the “https://”
- After disabling Multisite, homepage redirects to non-existing page
- I get “too many redirects” problem when migrating localhost site
- Internal redirect from page to category
- All links redirecting to homepage
- How to redirect non-admin/editors from specific pages?
- How to make a redirect link in wordpress?
- wp_redirect leading to an infinite loop
- I’ve move my site but URL still goes to the old site
- Redirect attachment URL
- Redirect based on $_GET parameters
- Conditional redirection with logout
- redirect users to the login page
- Moving an ASP Site to WordPress – Looking for Help on Redirects
- Rewrite Rule working different than expected
- WordPress Redirecting Form Action to Home Page
- Forcing header cache control in 404 pages
- Regex for pdf’s – Old .asp Site folder structure to new WordPress Media Folder(s)
- Redirect if a user has not written a post
- Create a custom redirect link that tracks the first visited page and after submitting form goes to first page using formidable forms plugin? [closed]
- WordPress not use site url when redirect 301
- Redirect certain 404 pages to parent page