ok, want to have my nice rails/mongrel app show a maint page when available... trying to do something like this... http://jonathan.tron.name/articles/2006/07/26/apache-2-0-x-mongrel-mod_proxy-mod_rewrite-configuration my vhost rewrite rules are... RewriteEngine On RewriteLog /var/log/apache2/rewrite_engine_log RewriteLogLevel 3 RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /maintenance.html [L] my rewrite log is... 127.0.0.1 - - [09/May/2007:13:55:07 --0500] [/sid#81d0960][rid#836a748/ initial] (1) pass through / 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ initial] (2) init rewrite engine with requested uri / 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ initial] (3) applying pattern ''^.*$'' to uri ''/'' 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ initial] (1) pass through / SOOO....it just passes on thru everything, uggg Any Rewrite experts out there ? --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
> http://jonathan.tron.name/articles/2006/07/26/apache-2-0-x-mongrel-mod_proxy-mod_rewrite-configuration > > my vhost rewrite rules are... > RewriteEngine On > RewriteLog /var/log/apache2/rewrite_engine_log > RewriteLogLevel 3 > RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f > RewriteCond %{SCRIPT_FILENAME} !maintenance.html > RewriteRule ^.*$ /maintenance.html [L]You have a typo... or at least don''t have the same code he has... his file is in the /system directory... Here''s the configs I''ve used in the past that have worked for me when public/system/maintenance.html exists... # Check for maintenance file and redirect all requests # ( this is for use with Capistrano''s disable_web task ) RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f RewriteCond %{SCRIPT_FILENAME} !maintenance.html RewriteRule ^.*$ /system/maintenance.html [L] -philip> > my rewrite log is... > 127.0.0.1 - - [09/May/2007:13:55:07 --0500] [/sid#81d0960][rid#836a748/ > initial] (1) pass through / > 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ > initial] (2) init rewrite engine with requested uri / > 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ > initial] (3) applying pattern ''^.*$'' to uri ''/'' > 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ > initial] (1) pass through / > > SOOO....it just passes on thru everything, uggg > > Any Rewrite experts out there ? > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
aktxyz-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-May-11 02:39 UTC
Re: rewriterule muck up
Yeah, I have mine in public/maintenance.html, I did try moving it to system under he superstition that maybe that mattered, but it did not. The really confusing thing is that the rewrite log says "comparing to /^.*$/ (ie everything), and then passing thru, come on, it''s gotta match ! On May 9, 2:55 pm, Philip Hallstrom <r...-SUcgGwS4C16SUMMaM/qcSw@public.gmane.org> wrote:> >http://jonathan.tron.name/articles/2006/07/26/apache-2-0-x-mongrel-mo... > > > my vhost rewrite rules are... > > RewriteEngine On > > RewriteLog /var/log/apache2/rewrite_engine_log > > RewriteLogLevel 3 > > RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f > > RewriteCond %{SCRIPT_FILENAME} !maintenance.html > > RewriteRule ^.*$ /maintenance.html [L] > > You have a typo... or at least don''t have the same code he has... his file > is in the /system directory... Here''s the configs I''ve used in the past > that have worked for me when public/system/maintenance.html exists... > > # Check for maintenance file and redirect all requests > # ( this is for use with Capistrano''s disable_web task ) > RewriteCond %{DOCUMENT_ROOT}/system/maintenance.html -f > RewriteCond %{SCRIPT_FILENAME} !maintenance.html > RewriteRule ^.*$ /system/maintenance.html [L] > > -philip > > > > > my rewrite log is... > > 127.0.0.1 - - [09/May/2007:13:55:07 --0500] [/sid#81d0960][rid#836a748/ > > initial] (1) pass through / > > 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ > > initial] (2) init rewrite engine with requested uri / > > 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ > > initial] (3) applying pattern ''^.*$'' to uri ''/'' > > 127.0.0.1 - - [09/May/2007:13:58:11 --0500] [/sid#81d0960][rid#836a748/ > > initial] (1) pass through / > > > SOOO....it just passes on thru everything, uggg > > > Any Rewrite experts out there ?--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---