Is it possible to have rails ignore a given route? http://mysite.com # => This is my rails app http://mysite.com/blog # => This is my wordpress blog Can I map a route so that rails will ignore, or not handle, the blog request? My 2 solutions are: 1) Move the app to a subdomain 2) Move the app into a subdrectory One of these will work, but out of curiosity, the question stands. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
> Is it possible to have rails ignore a given route?Dunno, but by the time it''s gotten to Rails, even if Rails did ignore it, what would happen? My guess is Rails would return a 404. It''s too late to pass it back even if it knew how to do so.> http://mysite.com # => This is my rails app > http://mysite.com/blog # => This is my wordpress blog > > Can I map a route so that rails will ignore, or not handle, the blog > request? > > My 2 solutions are: > 1) Move the app to a subdomainProbably the simplest as it completely isolates them, but not strictly necessary.> 2) Move the app into a subdrectoryDoable. Configure your webserver (apache/litespeed/etc) to *not* pass any requests matching "/blog" on to rails, but to handle them however it would handle it normally.> One of these will work, but out of curiosity, the question stands.Both will work as long as you configure it correctly. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Exactly the question I had in mind. I have my site and blog running PHP and Wordpress. Only my site is being turned into RoR, blog will remain as it is. It''s important to maintain all links as it is. As is written on Hostgator support page: http://forums.hostgator.com/showthread.php?t=13038 you have to create the .htaccess file and do the routing from there: RewriteEngine on RewriteCond %{REQUEST_URI} !^/cpanel/.* RewriteCond %{HTTP_HOST} ^www\.mydomain\.com [OR] RewriteCond %{HTTP_HOST} ^mydomain\.com RewriteRule ^(.*)$ /myapp/$1 [L,QSA] I haven''t dealt with this before, but I am assuming something like RewriteCond %{REQUEST_URI} !^/blog/.* as in RewriteCond % {REQUEST_URI} !^/cpanel/.* would work I a yet to try it once ready. What do you think? On Sep 13, 9:30 pm, ahab <andy...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Is it possible to have rails ignore a given route? > > http://mysite.com # => This is my rails apphttp://mysite.com/blog # => This is my wordpress blog > > Can I map a route so that rails will ignore, or not handle, the blog > request? > > My 2 solutions are: > 1) Move the app to a subdomain > 2) Move the app into a subdrectory > > One of these will work, but out of curiosity, the question stands.--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---