Backend Development

Custom error 500 page

Submitted by bradersrs, , Thread ID: 35995

Thread Closed
09-06-2017, 09:12 PM
#1
Hi, is it possible to have a custom error 500 page at all?

RE: Custom error 500 page

#2
have u googled this or just made a thread directly?

RE: Custom error 500 page

#3
Read about .htaccess mate.

RE: Custom error 500 page

#4
I found this for you:

https://www.digitalocean.com/community/t...untu-14-04

Took me 7 seconds to find it on Google XD

RE: Custom error 500 page

#5
There are many ways to set custom 500, most are done application layer on nginx/apache.

https://httpd.apache.org/docs/2.4/custom-error.html

https://www.digitalocean.com/community/t...untu-14-04

RE: Custom error 500 page

#6
09-06-2017, 09:12 PM
bradersrs Wrote:
Hi, is it possible to have a custom error 500 page at all?

yes, edit 500.html file from root folder as your wish

RE: Custom error 500 page

#7
I've managed to redirect to a custom php file to display the error 404 page via the configuration information I've set in the apache2 sites-available "website.conf" file, but the 500 page always displays a default browser 500 error page and not the one i've actually redirected to...

The PHP code takes the number of the "id" code posted to it and generates a large error number on the page and then displays the corresponding error's description...

ErrorDocument 404 /error/error.php?id=404
ErrorDocument 500 /error/error.php?id=500

If the 404 error redirects ok, any ideas why the 500 is not working and how I can fix it?

RE: Custom error 500 page

#8
The PHP framework LARAVEL has some nice built in features for 404 and other pages errors.

Don't try create your own.

RE: Custom error 500 page

#9
most PHP frameworks have built-in features for various errors. you can also customize it at webserver configs.

RE: Custom error 500 page

#10
yeah sure best framework of phpp

Users browsing this thread: 2 Guest(s)