ifm1989 Posted August 25, 2009 Share Posted August 25, 2009 I've searched on both google and on these forums and couldn't find an aswer. Basically, the following line is in my .htaccess: ErrorDocument 404 /404.php You would think...ok, place 404.php in your base directory (where the .htaccess is) and it should load it; instead, I get the generic google chrome 404 error. This is my entire .htaccess file incase that helps (if you see any other bugs or misswriten items, feel free to let me know ) # Prevent indexing where not wanted (everywhere) IndexIgnore * Options -indexes # Secure important files <FilesMatch "^(config|core|.server_config).php$"> Deny from All </FilesMatch> # Error document ErrorDocument 404 /404.php # Rewrite Mod <IfModule mod_rewrite.c> # Enable rewrite engine RewriteEngine on # Allow real directories and files RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # ...And the rewrite rules RewriteRule ^([^/\.]+)$ load.php?load=$1 [QSA,L] </IfModule> # Disable server signature ServerSignature Off Quote Link to comment https://forums.phpfreaks.com/topic/171752-errordocument-404-404php-not-working/ Share on other sites More sharing options...
trq Posted August 25, 2009 Share Posted August 25, 2009 Your syntax looks fine. I'm not sure what you mean by.... nstead, I get the generic google chrome 404 error. Error documents are always generated by the server in question. Maybe chrome displays its own googl'ised error page when it receives a 404? Quote Link to comment https://forums.phpfreaks.com/topic/171752-errordocument-404-404php-not-working/#findComment-905644 Share on other sites More sharing options...
ifm1989 Posted August 25, 2009 Author Share Posted August 25, 2009 Your syntax looks fine. I'm not sure what you mean by.... nstead, I get the generic google chrome 404 error. Error documents are always generated by the server in question. Maybe chrome displays its own googl'ised error page when it receives a 404? If I were to go to http://www.phpfreaks.com/randomrandomaduiashfiasdfas.php, I get a custom 404 error page that php freaks set up. If I go to a website that does not have a 404 page set up, google chrome will display a generic one. Same with firefox. That's my problem. My wamp server isn't displaying the 404.php file when I access a page that does not exist. Since it's not doing this, chrome is just dishing out the standard 404 error. It looks something like this: Quote Link to comment https://forums.phpfreaks.com/topic/171752-errordocument-404-404php-not-working/#findComment-905646 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.