开发者

Run PHP scripts stored inside Rails directory structure

开发者 https://www.devze.com 2023-01-21 20:49 出处:网络
I built开发者_如何学编程 a PHP application using Drupal and I want it to run under the same domain where Rails is running. So for exampleI have mysite.com running on Ruby on Rails, I would like to ins

I built开发者_如何学编程 a PHP application using Drupal and I want it to run under the same domain where Rails is running. So for example I have mysite.com running on Ruby on Rails, I would like to install and run Drupal in mysite.com/my_drupal_application.

I tried creating a subfolder inside rails , on the same level as apps and models directories but that did not worked. I tried moving creating a subfolder in the public directory too but it didnt worked either.

Maybe rails is confusing the url to be calling a controller? So what else should i do then?

Thanks a lot!


Both Drupal and rails have their own routing logic. Drupal stores it in both the database and the hook_menu, rails has it defined in the router.rb. They will conflict at some point.

So, the advice is to run your Drupal app on either a different subdomain, defined in a virtual-host. Alternatively you can define vhosts that define urls where your rails and Drupal app run. You should run them next to one another, and never inside one another.

0

精彩评论

暂无评论...
验证码 换一张
取 消