hi
is there a code to auto refresh the page if 503 apache error message appear ?

Recommended Answers

[B]503 Service Unavailable[/B]
The server is currently unavailable (because it is overloaded or down for maintenance).Generally, this is a temporary state.

This means that the site is still functioning as it recognises your request, but it cannot provide a service. I don't know if you can redirect …

Jump to Post

Sorry can't help - perhaps somebody else?

Jump to Post

All 8 Replies

Member Avatar
[B]503 Service Unavailable[/B]
The server is currently unavailable (because it is overloaded or down for maintenance).Generally, this is a temporary state.

This means that the site is still functioning as it recognises your request, but it cannot provide a service. I don't know if you can redirect a 503. I know you can create custom 404 (page not found) pages, but haven't come across 503 custom pages. I assume that they would show the generic 503 message - so no change. Perhaps httpd.conf directives may help. I will look, but no promises. If I find something - I'll get back - don't hold your breath.

//EDIT

Found loads on forcing a 503 error, but next to nothing about how to address it.

Thanks Dear ardav
503 error solves by refresh the page , that's why i need a something make it auto refresh if this error appear instead of user refresh it by himself , and maybe the user doesn't refresh and close the page , so i lost users

I trust your experience , i'm waiting your come back

Thanks

Member Avatar

Sorry can't help - perhaps somebody else?

I think you can use .htaccess to redirect error pages but as far as forcing it to refresh? I think that could get into an infinite loop right? Anyway I think you could do something like this:

ErrorDocument 503 /refreshpage.php

in your .htaccess file. Then in refreshpage.php, have it refresh the page. Just a thought. Haven't played with htaccess in awhile though.

Thanks Guys
I was also thinking the same way about .htaccess and also was worried about infinite loop , but i'm not sure about it , is there any one certainity about if it may cause a loop or it would be working ? because to test it i have to browse the website till the error comes , so i don't know when it would be come

i have tried .httaccess > ErrorDocument 503 /refreshpage.php
but it doesn't work , why ?
in same way i have tried 404 error and it works fine , but 503 error doesn't redirect with htaccess ??

Not sure. I guess if you're getting a server unavailable message, you're not able to access the server(which contains the .htaccess file and refresh.php) so maybe it's not possible. Like I said, I haven't done anything with htaccess in awhile and I don't think I ever tried to redirect a 503 so maybe someone else can help. Sorry.

Thanks for try helping dear

anyone have an idea please ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.