Can Rails and PHP work together?

Hello everyone,

I am new to RoR, coming from an ASP.NET background. I’m currently
working
on a politically-themed social network, and I want to have multiple
bloggers
who will blog about various topics. My web host offers several
PHP-based
blogging engines, and I like WordPress, so I am trying to set it up with
a
subdomain such as blogs.mydomain.com/blog_name. However, I’m getting
Rails
errors because the URL uses the same conventions as Rails, and it’s
trying
to interpret it as a Rails application, so it’s not finding a controller
or
view.

Is there any way that I can tell Rails NOT to try and parse these URLs?
I
mean, I could easily just tack on index.php to the URL, and it seems to
work
properly, but I’m sure I won’t always remember it, and I doubt the
bloggers
will, either (I want to give them some degree of autonomy with their
blogs).

Can anyone provide suggestions?

Regards,

Wayne M.
Co-founder, LibertyTruth.org

On Feb 19, 2008, at 7:33 PM, Wayne M. wrote:

Is there any way that I can tell Rails NOT to try and parse these
URLs? I mean, I could easily just tack on index.php to the URL, and
it seems to work properly, but I’m sure I won’t always remember it,
and I doubt the bloggers will, either (I want to give them some
degree of autonomy with their blogs).

Can anyone provide suggestions?

Regards,

Personally, I’d create an Apache virtual host for blogs.mydomain.com
and set the DocumentRoot to wherever you need your PHP app to live.

On Feb 19, 7:41 pm, “s.ross” [email protected] wrote:

I am trying to set it up with a subdomain such as blogs.mydomain.com/
Can anyone provide suggestions?

Regards,

Personally, I’d create an Apache virtual host for blogs.mydomain.com
and set the DocumentRoot to wherever you need your PHP app to live.

did you see this
http://www.igvita.com/2007/07/04/integrating-wordpress-and-rails/

Wayne M. wrote:

blogs.mydomain.com/blog_name http://blogs.mydomain.com/blog_name.

Is there any way that I can tell Rails NOT to try and parse these URLs?

No. You must tell mommy to separate these children’s toys. Configure
your web
server itself (Apache or whatever) to route certain paths to PhP and
others to
Rails.


Phlip