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 ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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] |
|
|||
|
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 |
|
|||
|
<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. |
|
|||
|
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 |
|
|||
|
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. |