If a website receives too many connections at the same time (overloaded by a lot of users visiting the website at the same time), is there a way to direct users to a static html page automatically?
I'm not sure if I am on the right track but would this land with the htaccess file where if the user spends an x amount of time trying to connect to the server, it would just show them a static html error page instead?
If so... Which error page should I be creating (408 timeout?) and how could I set it so that if the user attempts to connect for about 10 seconds it should automatically direct them to that static html error page?
Below is what I would personally put in the htaccess if I want custom error pages but how would I be able to direct them to that page if they can't load a page after 10 seconds?
ErrorDocument 404 /custom404.html
# Can also do the same for other errors...
ErrorDocument 500 /custom500.html
EDIT
So as an example, if the website deals with tracking airplane flights and an airplane suddenly goes missing, a lot of people are going to start flooding that site immediately. So assuming that it's more than what the server can handle, I would assume that users will end up waiting for a while to connect to the server? If so, would that then result to an error page or would they just keep on waiting?