You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Zouari Fourat <fo...@gmail.com> on 2005/01/14 12:02:35 UTC

[users@httpd] Redirecting all url's to a unique one while updating the site

Hello
I would like to redirect all visits to a unique page on wich i'll show
that the site is under maintenance and remove this option once
finished my updates.
is there anybody who made that simple ?

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirecting all url's to a unique one while updating the site

Posted by Bob Smith <bs...@sudleyplace.com>.
Try this:

RewriteEngine   on
RewriteCond     %{HTTP_HOST}    ^(.+\.)*yourdomain\.com$ [NC]
RewriteRule     ^.*$            /path/to/unique/page/index.html [L]

If this is a one domain site, you can skip the RewriteCond.

On 1/14/2005 7:47 AM, Zouari Fourat wrote:
> didnt find the correct directive/regex to use with mod_rewrite, can
> anybody help me ?
> 
> 
> On Fri, 14 Jan 2005 12:35:55 +0100, André Malo <nd...@perlig.de> wrote:
> 
>>* Grand Apeiron wrote:
>>
>>
>>>On Fri, 2005-01-14 at 12:02 +0100, Zouari Fourat wrote:
>>>
>>>>Hello
>>>>I would like to redirect all visits to a unique page on wich i'll show
>>>>that the site is under maintenance and remove this option once
>>>>finished my updates.
>>>>is there anybody who made that simple ?
>>>
>>>You can achieve that with mod_rewrite
>>>
>>>http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
>>
>>Well, that's possible (but not that good in terms of HTTP), but there's a
>>better solution using mod_alias:
>>
>>Redirect 503 /

-- 
_______________________________________________________________
Bob Smith - bsmith@sudleyplace.com - http://www.sudleyplace.com
a.k.a.      bsmith@qualitas.com    - http://www.qualitas.com


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirecting all url's to a unique one while updating the site

Posted by Zouari Fourat <fo...@gmail.com>.
didnt find the correct directive/regex to use with mod_rewrite, can
anybody help me ?


On Fri, 14 Jan 2005 12:35:55 +0100, André Malo <nd...@perlig.de> wrote:
> * Grand Apeiron wrote:
> 
> > On Fri, 2005-01-14 at 12:02 +0100, Zouari Fourat wrote:
> > > Hello
> > > I would like to redirect all visits to a unique page on wich i'll show
> > > that the site is under maintenance and remove this option once
> > > finished my updates.
> > > is there anybody who made that simple ?
> >
> > You can achieve that with mod_rewrite
> >
> > http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
> 
> Well, that's possible (but not that good in terms of HTTP), but there's a
> better solution using mod_alias:
> 
> Redirect 503 /
> 
> nd
> --
> "Solides und umfangreiches Buch"
>                                           -- aus einer Rezension
> 
> <http://pub.perlig.de/books.html#apache2>
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
>    "   from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 
>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirecting all url's to a unique one while updating the site

Posted by André Malo <nd...@perlig.de>.
* Grand Apeiron wrote:

> On Fri, 2005-01-14 at 12:02 +0100, Zouari Fourat wrote:
> > Hello
> > I would like to redirect all visits to a unique page on wich i'll show
> > that the site is under maintenance and remove this option once
> > finished my updates.
> > is there anybody who made that simple ?
>
> You can achieve that with mod_rewrite
>
> http://httpd.apache.org/docs-2.0/misc/rewriteguide.html

Well, that's possible (but not that good in terms of HTTP), but there's a 
better solution using mod_alias:

Redirect 503 /

nd
-- 
"Solides und umfangreiches Buch"
                                          -- aus einer Rezension

<http://pub.perlig.de/books.html#apache2>

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Redirecting all url's to a unique one while updating the site

Posted by Grand Apeiron <Gr...@gmx.net>.
On Fri, 2005-01-14 at 12:02 +0100, Zouari Fourat wrote:
> Hello
> I would like to redirect all visits to a unique page on wich i'll show
> that the site is under maintenance and remove this option once
> finished my updates.
> is there anybody who made that simple ?

You can achieve that with mod_rewrite

http://httpd.apache.org/docs-2.0/misc/rewriteguide.html


Grand Apeiron


-- 
If I would be a tapeworm, I would prefer penguins.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org