wordpress 404 redirect to other url

If you are using wordpress as blog of your website blog and you are using other cms as your main website now you want any 404 of wordpress blog will redirect to that other cms 404 page then you use below code example to redirect your wordpress blog 404 page.

add_action('wp','determine_if_fourzerofour_page');
function determine_if_fourzerofour_page(&$arr){
    global $wp_query;    
    if($wp_query->is_404){        
        $url_redirect = 'http://www.exampledomain.com/404.php';        
        header('Location: '.$url_redirect);
        die;
    }
}

404 Page Not Found after custom form submission on wordpress

Sometimes it’s happen! when you submit a wordpress form it says ‘Page Not Found!’ or Saying ‘This is somewhat embarrassing, isn’t it?It seems we can’t find what you’re looking for. Perhaps searching, or one of the links below, can help.’

But your defined page action has a valid url and all post values are available too on that same page. Also if you submit that form as empty input that it works fine!

If this is the case then The problem is by the “name” parameter you posted from your form. WordPress has some reserve parameter for internal use like client_name, author_name etc

So you just need to try with renaming your form fields. Hope it will solve it!

404 error – page not found – wordpress

If you are a wordpress user or a wordpress developer then sometimes you may noticed a error when you are trying to view a post or page Like:

Error 404: NOT FOUND!
Your browser cannot find the document corresponding to the URL you typed in.

Sometimes it will happen when your permalinks is not accepted as valid on wordpress. If the permalinks settings is not valid then you can fix this error your wordpress admin panel. Just go to the settings tabs permalinks settings, then select a default settings. Then test your site.

If it seems your error is fixed then search on wordpress for any article about using permalinks to use custom permalinks.