2

I How to configure Apache so I can redirect to another page on a specified TimeOut. Is this possible?

niels
  • 245
  • 3
  • 14

1 Answers1

0

Didn't find any possible solution how to do this in Apache.

Still, if you are using PHP, try playing with PHP register_shutdown_function function.

Sample code:

set_time_limit(1);
function shutdown () {
    if ( ! defined('FINISHED')) {
        header('Location: /timeout');
    }
}

register_shutdown_function('shutdown');

while (true) {}

define('FINISHED', 1);

Still this will be executed on fatal errors as well and after manual die() or exit() calls inside your scripts.

Gedrox
  • 3,592
  • 1
  • 21
  • 29