StudioPress Community Forums
  StudioPress Community Forums > Forums > General Discussion
For help and support, access to your downloads, or to manage your account please log into My StudioPress.

These forums have been set to read-only so you can browse the existing topics for any questions you may have.

For general discussion on WordPress, CSS and design (NOT for support) visit the new Community Forums.
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 10-06-2011, 02:31 PM
pypo pypo is offline
Registered User
Pro Plus Member
 
Join Date: Oct 2008
Posts: 375
Default How to redirect your 404 error to a custom page

Is there a best way in Genesis to redirect all 404 errors to a landing page?

There is this plugin that redirects all 404 errors to the home page. But I want to redirect all 404 errors to a page called "http:/myblog/404-landing-page"

Any advice?

Quote:
function redirect_all_404s() {
global $wp_query;
if ($wp_query->is_404 ) {
header("Location: ".get_bloginfo('siteurl'),TRUE,301);
}
}
add_action('wp', 'redirect_all_404s');

?>
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Fatal Redirect Error SOUSA General Discussion 5 01-13-2010 12:21 AM
Fatal error after redirect renwil General Discussion 15 01-11-2010 10:45 AM


All times are GMT -5. The time now is 11:39 AM.

Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.