.htaccess - I appear to have 500 error page and no 404 error page, why? -


i'm trying create custom 500 , 404 error pages

here's .htaccess page:

options -multiviews     rewriteengine on rewritecond %{request_filename} !-f rewritecond %{request_filename} !-d rewritecond %{request_filename} !\.php$ rewriterule ^(.*)$ $1.php [l,qsa]  errordocument 404 "sorry, page not found" errordocument 500 "sorry, went wrong, try again later"  

here's 404 page http://example.com/cats - not page (but it's showing 500)

and 1 should 500 http://example.com/dogs - page (because query returned blank) it's not error message @ - guessing should 500 anyway, be

it appears show 500 , no 404, can't figure out how stop/fix it, ideas???

fixed

a 500 thrown if there exception thrown php, not logical errors. select query returning blank result isn't considered error php queries return blank result part of legitimate flow of code.

with regards getting 500 instead of 400, appears here http://www.javascriptkit.com/howto/htaccess2.shtml should forwarding page rather trying pass in string. set page want displayed , put url in htaccess

like so:

errordocument 500 /errors/serverr.html 

Comments

Popular posts from this blog

css - Which browser returns the correct result for getBoundingClientRect of an SVG element? -

gcc - Calling fftR4() in c from assembly -

Function that returns a formatted array in VBA -