GlenPig Posted February 10, 2017 Share Posted February 10, 2017 Hi Everyone Currently using v2.3.4 Bootstrap and when a 404 error occurs you get redirected to the home page, which is a bit confusing for visitors as there is no message as to why. I've added in the normal line into .htaccess but this makes no difference and still redirects you to the home page... ErrorDocument 404 /errors/404.php ...I'm sure I'm missing something obvious, but how do I stop osC redirecting to the home page for a 404 error and to my custom error page instead? Many thanks Glen Link to comment Share on other sites More sharing options...
Jack_mcs Posted February 10, 2017 Share Posted February 10, 2017 That is saying the 404.php file is in the errors directory so the you should verify that directory exists and the 404.php file is in it. If it is, then it might be that your host is preventing the redirect or the server requires a different format, like the following. There could also be a file in the errors directory preventing it from being reached. You could try copying the 404 file to the root and removing the errors from the path to see if that helps. ErrorDocument 404 http://your domain/errors/404.php Support Links: For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc. All of My Addons Get the latest versions of my addons Recommended SEO Addons Link to comment Share on other sites More sharing options...
MrPhil Posted February 10, 2017 Share Posted February 10, 2017 Also check your .htaccess file(s) to see if there's anything (especially SEO entries) that capture requests that are not for a real file or directory, and send it to some place like index.php. Look for lines similar to RewriteCond %{REQUEST_FILE} !-f RewriteCond %{REQUEST_FILE} !-d Do you have other applications, such as WordPress? They'll be set up to do things like that. It's possible that some osC SEO packages may do that too. If that's the case, they're working as designed and it might be tough to get them to turn over 404s to you. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.