total apache redirection to single page?

This is a discussion on total apache redirection to single page? within the Linux Web Servers forums, part of the Web Server and Related Forums category; We need to bring our sites down for some maintenance, and need to make it so that any URL to ...


Go Back   Usenet Forums > Web Server and Related Forums > Linux Web Servers

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 11-29-2007
mechphisto@gmail.com
 
Posts: n/a
Default total apache redirection to single page?

We need to bring our sites down for some maintenance, and need to make
it so that any URL to a page on our site redirects to a single page we
have with the "site down" message.
How can I do this?

I tried setting the DocumentRoot variable in httpd.conf to a directory
with the message as an index.html...and of course that works when
someone just goes to the basic domain name...but not if someone tries
a URL that takes then directly to a different page. They just get
requested URL not found on server error.

If someone can just tell me what part of the httpd.conf to look into
to do this, I can research it from there.
Thanks!
-Liam
  #2 (permalink)  
Old 11-29-2007
dterrors@hotmail.com
 
Posts: n/a
Default Re: total apache redirection to single page?

On Nov 29, 2:56 pm, mechphi...@gmail.com wrote:
> We need to bring our sites down for some maintenance, and need to make
> it so that any URL to a page on our site redirects to a single page we
> have with the "site down" message.
> How can I do this?
>
> I tried setting the DocumentRoot variable in httpd.conf to a directory
> with the message as an index.html...and of course that works when
> someone just goes to the basic domain name...but not if someone tries
> a URL that takes then directly to a different page. They just get
> requested URL not found on server error.
>
> If someone can just tell me what part of the httpd.conf to look into
> to do this, I can research it from there.
> Thanks!
> -Liam


What version of apache?

Look into mod_rewrite.

..htaccess
RewriteEngine On
RewriteRule ^.* /downmessage.html [R]



  #3 (permalink)  
Old 11-29-2007
mechphisto@gmail.com
 
Posts: n/a
Default Re: total apache redirection to single page?

On Nov 29, 2:23 pm, dterr...@hotmail.com wrote:
> On Nov 29, 2:56 pm, mechphi...@gmail.com wrote:
>
> > We need to bring our sites down for some maintenance, and need to make
> > it so that any URL to a page on our site redirects to a single page we
> > have with the "site down" message.
> > How can I do this?

>
> > I tried setting the DocumentRoot variable in httpd.conf to a directory
> > with the message as an index.html...and of course that works when
> > someone just goes to the basic domain name...but not if someone tries
> > a URL that takes then directly to a different page. They just get
> > requested URL not found on server error.

>
> > If someone can just tell me what part of the httpd.conf to look into
> > to do this, I can research it from there.
> > Thanks!
> > -Liam

>
> What version of apache?
>
> Look into mod_rewrite.
>
> .htaccess
> RewriteEngine On
> RewriteRule ^.* /downmessage.html [R]


Doh, sorry.
Apache/2.0.52 (Red Hat)

Thanks, I'll look into that! =)
Thanks for the reply.
-Liam
  #4 (permalink)  
Old 11-29-2007
D. Stussy
 
Posts: n/a
Default Re: total apache redirection to single page?

<mechphisto@gmail.com> wrote in message
news:e4edf2d4-e898-4d82-bc28-69b6f4a1c4e7@o6g2000hsd.googlegroups.com...
> On Nov 29, 2:23 pm, dterr...@hotmail.com wrote:
> > On Nov 29, 2:56 pm, mechphi...@gmail.com wrote:
> >
> > > We need to bring our sites down for some maintenance, and need to make
> > > it so that any URL to a page on our site redirects to a single page we
> > > have with the "site down" message.
> > > How can I do this?

> >
> > > I tried setting the DocumentRoot variable in httpd.conf to a directory
> > > with the message as an index.html...and of course that works when
> > > someone just goes to the basic domain name...but not if someone tries
> > > a URL that takes then directly to a different page. They just get
> > > requested URL not found on server error.

> >
> > > If someone can just tell me what part of the httpd.conf to look into
> > > to do this, I can research it from there.
> > > Thanks!
> > > -Liam

> >
> > What version of apache?
> >
> > Look into mod_rewrite.
> >
> > .htaccess
> > RewriteEngine On
> > RewriteRule ^.* /downmessage.html [R]

>
> Doh, sorry.
> Apache/2.0.52 (Red Hat)
>
> Thanks, I'll look into that! =)
> Thanks for the reply.
> -Liam


RewriteRule .* /downmessage.html [L]

.... might be better. The "^" is redundant, and so is the redirection.


  #5 (permalink)  
Old 11-29-2007
mechphisto@gmail.com
 
Posts: n/a
Default Re: total apache redirection to single page?

On Nov 29, 3:46 pm, "D. Stussy" <s...@bde-arc.ampr.org> wrote:
> <mechphi...@gmail.com> wrote in message
>
> news:e4edf2d4-e898-4d82-bc28-69b6f4a1c4e7@o6g2000hsd.googlegroups.com...
>
>
>
> > On Nov 29, 2:23 pm, dterr...@hotmail.com wrote:
> > > On Nov 29, 2:56 pm, mechphi...@gmail.com wrote:

>
> > > > We need to bring our sites down for some maintenance, and need to make
> > > > it so that any URL to a page on our site redirects to a single page we
> > > > have with the "site down" message.
> > > > How can I do this?

>
> > > > I tried setting the DocumentRoot variable in httpd.conf to a directory
> > > > with the message as an index.html...and of course that works when
> > > > someone just goes to the basic domain name...but not if someone tries
> > > > a URL that takes then directly to a different page. They just get
> > > > requested URL not found on server error.

>
> > > > If someone can just tell me what part of the httpd.conf to look into
> > > > to do this, I can research it from there.
> > > > Thanks!
> > > > -Liam

>
> > > What version of apache?

>
> > > Look into mod_rewrite.

>
> > > .htaccess
> > > RewriteEngine On
> > > RewriteRule ^.* /downmessage.html [R]

>
> > Doh, sorry.
> > Apache/2.0.52 (Red Hat)

>
> > Thanks, I'll look into that! =)
> > Thanks for the reply.
> > -Liam

>
> RewriteRule .* /downmessage.html [L]
>
> ... might be better. The "^" is redundant, and so is the redirection.


Thanks for the tip. =)
I'd found:
http://httpd.apache.org/docs/1.3/mod...ml#RewriteRule
and started looking there, and was coming to a similar realization,
but not yet what to do about it.
Thanks!
-Liam
  #6 (permalink)  
Old 12-03-2007
C.
 
Posts: n/a
Default Re: total apache redirection to single page?

On 29 Nov, 20:23, dterr...@hotmail.com wrote:
> On Nov 29, 2:56 pm, mechphi...@gmail.com wrote:
>
> > We need to bring our sites down for some maintenance, and need to make
> > it so that any URL to a page on our site redirects to a single page we
> > have with the "site down" message.
> > How can I do this?

>
> > I tried setting the DocumentRoot variable in httpd.conf to a directory
> > with the message as an index.html...and of course that works when
> > someone just goes to the basic domain name...but not if someone tries
> > a URL that takes then directly to a different page. They just get
> > requested URL not found on server error.

>
> > If someone can just tell me what part of the httpd.conf to look into
> > to do this, I can research it from there.
> > Thanks!
> > -Liam

>
> What version of apache?
>
> Look into mod_rewrite.
>
> .htaccess
> RewriteEngine On
> RewriteRule ^.* /downmessage.html [R]


Or define the ErrorDocument for 404 responses.

C.
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:39 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0