How top redirect on timeout

Discussion in 'Apache' started by souviksb, Feb 7, 2011.

  1. #1
    Hi,

    I am using Apache as my proxy server, whoch redirects request to applications on JBOSS. I have mentioned timeout in pache to 120(assuking seconds) in httpd.cong. When I hit a request on pache, then wait for 3 mins and again hit another request on paache in the asame browser, I do not see any timout message and the rewquest is executed successfully. Both the requests are Rewritten to JBOSS using RewriteRule.

    Please let me know, how I can make the Timeout work in apache and redirect a request to a timeout page when the timeout occurs. It would be good if I can executre soem script when timeout occurs.

    Any response will be highly appreciated.

    Souvik
     
    souviksb, Feb 7, 2011 IP
  2. moads

    moads Member

    Messages:
    115
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    28
    #2
    In Javascript this will timeout and redirect after 1 second.

    <script type="text/javascript">
    setTimeout("top.location.href = 'http://yoursite.com/script.php'", 1000);
    </SCRIPT>
     
    moads, Feb 7, 2011 IP