404 Page Not Found automatic redirect to the homepage? - RESOLVED
Permalink 1 user found helpful
I'm trying to figure out a way to get page_not_found.php to automatically redirect to the homepage. I understand that I copy this from /concrete/single_pages/ to /single_pages but am not sure what code I would insert into this document to make it automatically go to the base_url.
I also tried using the "Page Selector Attribute" and "Page Redirect" add-ons to redirect the Page Not Found system page through the CMS but this doesn't work. I assume this has something to do with how this add-on relates to single pages or something to that affect.
Any thoughts would be much appreciated. Thanks ahead of time.
I also tried using the "Page Selector Attribute" and "Page Redirect" add-ons to redirect the Page Not Found system page through the CMS but this doesn't work. I assume this has something to do with how this add-on relates to single pages or something to that affect.
Any thoughts would be much appreciated. Thanks ahead of time.
Using some Wordpress forums I managed to get 404's to redirect using the following code in the 'page_not_found.php' file and it seems to work just fine:
Now another question. Does anyone know what I would insert to redirect to the 'base_url' instead of hard-coding the site name in this instance? I've tried $base_url <$base_url> and <base_url> as well and they redirected to a page using the actual characters (resulting in 404's) instead of directing to the actual base url.
Now another question. Does anyone know what I would insert to redirect to the 'base_url' instead of hard-coding the site name in this instance? I've tried $base_url <$base_url> and <base_url> as well and they redirected to a page using the actual characters (resulting in 404's) instead of directing to the actual base url.
I don't really understand quite how this syntax works within the server so I can't rightly modify it to do what I want relating to the 404's. Anyone?