Rails and php mixed

Hi,

I have a rails site hosted in a mediatemple DV plan. I am not using
mongrels as web server, instead i am using passenger and it works
great.

Now what i want to do, is to host a PHP legacy site inside my public’s
rails folder, so any user can acces the rails site using for example
www.misite.com and acces the PHP site using www.misite.com/phpsite/

I have search for this on the internet and try differents ways but
without any luck… any idea about how can i do this?

Regrads

Note: Just in case, each domain is located in a vhost directory
(mediatemple Dv default config)

fRAnKEnSTEin wrote:

Hi,

I have a rails site hosted in a mediatemple DV plan. I am not using
mongrels as web server, instead i am using passenger and it works
great.

Now what i want to do, is to host a PHP legacy site inside my public’s
rails folder, so any user can acces the rails site using for example
www.misite.com and acces the PHP site using misite.com

Don’t do it that way. Put the Rails and PHP sites in separate
directories on the server. Set up a separate virtual host (say,
phpsite.misite.com ) for the PHP site (you can do this in your Web
server configuration).

I have search for this on the internet and try differents ways but
without any luck… any idea about how can i do this?

Regrads

Note: Just in case, each domain is located in a vhost directory
(mediatemple Dv default config)

Perfect, then…you’ve already got your vhost. If you really want URLs
of the form www.misite.com/phpsite, then set up a redirect.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Perfect, then…you’ve already got your vhost. If you really want URLs
of the formwww.misite.com/phpsite, then set up a redirect.

Hi,

ok, but that where i have to put that redirect sentence? i mean,
in .htaccess file inside public rails app, or inside php site folder,
or in my www.site.com vhost file, or in httpd.conf file?

i am bit confused here.

Cheers

Perfect, then…you’ve already got your vhost. If you really want URLs
of the form www.misite.com/phpsite, then set up a redirect.

Hi,

yes i need to use that URL form(www.misite.com/phpsite and
ww.misite.com), but where i have put that redirect sentence? i mean,
in .htaccess file inside my rails app’s public folder?, or inside php
app folder?, 
or in my domain vhost file, or in httpd.conf file?

I have tryed to put some “rewrite” rules in all that files i have just
sayed(and restart apeche), but none of them worked. Can you tell me
how that redirect could be donde and where i have to put it?

regards

fRAnKEnSTEin wrote:

Perfect, then…you’ve already got your vhost. �If you really want URLs
of the formwww.misite.com/phpsite, then set up a redirect.

Hi,

ok, but that where i have to put that redirect sentence? i mean,
in .htaccess file inside public rails app, or inside php site folder,
or in my www.site.com vhost file, or in httpd.conf file?

Well, you’re redirecting from www.misite.com/phpsite. That means you
need to put the redirect in the part of the Web server that’s processing
that URL.

i am bit confused here.

What’s confusing about it? All that a redirect does is intercept a
request and send it somewhere else.

Cheers

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]