You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Götz Lohmann <go...@mrblackrose.de> on 2004/11/15 13:02:25 UTC
[users@httpd] {Spam?} Re: [users@httpd] Qs: server maintenance, URL redirection, etc
Matthew England schrieb:
> Hi,
>
> I will periodically want to "take down" my Apache server, or
> applications being served on said server (like phpBB), for
> maintenance. I want my users to be advised appropriately when this
> Apache server is in such a mode.
>
> To this end, a few questions:
>
> 1) When I take down only a certain application (again, like phpBB), I
> want all phpbb-specific URLs to go to a phpbb-specific "under
> construction" area, rather then having all the invalid/404 URLs
> directed to an "invalid" page. More specifically, I want ever URL
> with https://<servername>/forums/* (because phpbb dir maps to
> "/forums") to temporarily go to an alternative web page...but only the
> /forums/* links (and not any of the others). How do I do this? I see
> no mention of finding out what URL the client is attempting to access
> at http://httpd.apache.org/docs/mod/core.html#errordocument .
>
> Further, to this end, I want the forums area to be available
> specifically to *me* at a special address (that presumably only I know
> and/or is accessible only via my own secure access) during this time.
> I think I know to do this last part...but I thought I would mention
> this as a requirement for the above purpose.
>
> 2) I am hoping theres a general FAQ/RTFM site/page that points out
> strategies for gracefully managing Apache server/app downtime in
> general. eg, can I redirect my main server that I'm working on and
> testing to another port (eg, 8080 for normal port, 444 for altnerative
> SSL port, etc) to do this? If so, this does not always jive with
> server apps (eg, many of them assume a root URL in their underlying
> config/database). I'm sure this a common FAQ that's answered somewhere.
>
> Thanks for any help!
> -Matt
why not using .htaccess redirect like:
Redirect permanent /thisfile.html http://www.domain.de/somewhere/this.html
Redirect temp /thatfile.html http://www.domain.de/somewhere/that.html
which you drop in the phpBB directory .. that way you haven't make an
apache reload
look for more info about that in mod_alias
or try mod_rewrite with a ruleset depending on the timestamp to redirect
like
RewriteCond %{TIME_HOUR} >06
RewriteCond %{TIME_HOUR} <09
RewriteRule ^.*$ http://www.domain.com/morning.htm
RewriteCond %{TIME_HOUR} >17
RewriteCond %{TIME_HOUR} <20
RewriteRule ^.*$ http://www.domain.com/evening.htm
take look at: http://modrewrite.com/
regards, G. Lohmann