please design a rule such that any .php request is blocked by apache as File Not Found 404 and is not forwarded to mongrel. ie instead of this error ActionController::RoutingError (no route found to match "/view.php" with {:method=>:get}): I should get .... File Not Found 404 ripan --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
I have something like this in my apache vhost: RewriteEngine On RewriteRule \.php$ /404.html [R=404,L] (Actually, I have a bunch of specific rewrites that move people to our old php site''s URLs to the new rails site''s corresponding URL, so please forgive me if my regexp is not quite right.) -Kyle On May 13, 1:42 am, ripan <rip.chandig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> please design a rule such that any .php request is blocked by apache > as File Not Found 404 and is not forwarded to mongrel. > > ie instead of this error > ActionController::RoutingError (no route found to match "/view.php" > with {:method=>:get}): > > I should get .... > > File Not Found 404 > > ripan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi ...thanx 4 replying, RewriteRule ^/?(.*\.php)$ %{DOCUMENT_ROOT}/public/404.html rewrite rule is working for me Ripan On May 13, 9:10 pm, Kyle <kyle.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I have something like this in my apache vhost: > > RewriteEngine On > RewriteRule \.php$ /404.html [R=404,L] > > (Actually, I have a bunch of specific rewrites that move people to our > old php site''s URLs to the new rails site''s corresponding URL, so > please forgive me if my regexp is not quite right.) > > -Kyle > > On May 13, 1:42 am, ripan <rip.chandig...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > please design a rule such that any .php request is blocked by apache > > as File Not Found 404 and is not forwarded to mongrel. > > > ie instead of this error > > ActionController::RoutingError (no route found to match "/view.php" > > with {:method=>:get}): > > > I should get .... > > > File Not Found 404 > > > ripan--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---