To understand why your redirect isn’t working, you should consider the mechanism it’s using: the Location HTTP header. The problem here is that HTTP headers cannot be sent once you begin outputting content onto the page. Your task is to determine where that content is being output.
- Is it a plugin? Try disabling all your plugins and see if that fixes it.
- Is it your theme? Try switching to a different theme (modify it to use your logout hook) and see if that fixes it.
Related Posts:
- Redirect Restricted Page to 404
- Redirect user to original url after login?
- Redirect to dashboard after login
- Site redirects to wrong url when saving settings
- Redirect blog page to latest post?
- WordPress site redirects to different wordpress domain on the same server after reuploading db backup
- 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?
- Redirect the non-www version of the site to the www
- 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
- How to use a custom domain?
- Changing siteurl and homeurl – internal links redirect to home page?
- 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?
- 301 redirect instead of 404 when URL is a prefix of a post or page name?
- 301-redirect directives for blogger to wordpress migration
- Redirect users after register (first login) and force submit post
- Stop Redirecting to and from www
- How to pass a message using template_redirect
- Disable WordPress URL auto complete
- Redirect specific URL before other redirects take place in .htaccess?
- 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?
- How to get better performance for redirect from domain.tld/35 to domain.tld/full-permalink?
- Redirect deleted page URL ?p=xxxx
- Have WordPress post redirect to url when accesed from iPad (Safari)
- I want to resolve Redirect Chain [closed]
- How to fix URL with pageid example /?p= too many redirection error
- Conditional redirect to several pages
- Adding query string parameters to URL with same name as custom post type gives 404 error
- Display Freebie Page Content only if Referrer is from Form Page
- Dynamic redirect
- simple wordpress form redirection
- Redirect to home if page doesn’t exists [duplicate]
- Redirect all links form a category to new links on new category
- My redirect URL doesn’t show any pages on my website [closed]
- Forced Redirect on a server migration
- Site Address and WordPress Address settings when using a load balancer
- Cannot install wordpress, /wp-admin/install.php, inproper redirection [closed]
- Prevent “/login” to redirect to “/wp-login”
- How to redirect logged out users to specific page?
- Redirect certain pages if user logged in
- Login redirect shows white page in firefox
- Redirect to post_id?
- Date based redirects of posts that no longer exist
- How can I disable redirect domains?
- redirect wordpress post to new subfolder site on same domain
- 301 all old pages to new location
- Use a 301 to Redirect any 404 from at the blog post level to the blog archive
- How do I share a site only to one User at the time? Please help 🥺🙌
- Re-Direct ALL Users to the Home Page IF not logged in
- Author Archive Page redirecting issue
- Understanding Redirects
- Random redirect to wp-admin/install.php
- Changing auth_redirect() page
- How to redirect returning users who previously logged in?
- Why https://www. SUBdomain is redirected by WP to https://MAINdomain
- Page editing in backend redirecting to 404 page not found with url /post.php
- wordpress redirect error in xampp
- Swapping current old site to new WordPress site – need to check I’m doing it right
- how redirect users to custom login page when user comment must “login to reply” is clicked?
- Redirect User to Specific Page
- Allow GET request on certain page
- .htaccess redirect for old subfolder installation to new subfolder installation and https
- PHP Mistake – Whats wrong here?
- On login redirect to different homepage if user is using a mobile
- WordPress update 4.4.1 redirect loop
- Redirecting Issue
- Redirect user to login and then to page where they came from
- htaccess and redirect to new url using regex
- redirect attachment page to category page
- 301 redirect for wordpress permarlink
- Google PageSpeed: Avoid landing page redirects?
- Redirect to 404.php from single.php
- How to make my homepage automatically redirect to an external website?
- How to Show different page URL instead of default home page URL
- How to Redirect Url to homepage?
- 404 Not Found with All Cloaking plugins
- Stopping media file redirects
- How to find out what is causing redirect of static content?