Forum: Ruby on Rails rails prettyurl's

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
tom (Guest)
on 2006-04-27 12:14
hi

we wanted to embed a rails application into our cms generated php
files.

small example:

static site: www.someweb.com/someweb/somepage.php

the code in the somepage.php file will use curl (remote http call) to
load the rails application into its layout. now the problem is that all
the urls (links, forms) generated by the rails application will leave
somepage.php and point to something like
www.someweb.com/railscontroller/railsaction/id/

what i tried to do was to tell rails to just use GET params for the
controller/action/id instead of the directory structure. after failing
for a while now, i played around with routes.rb and also looked into
the .htaccess file, i hope that i can get some help here.

interesting is that when i remove the map.connect
":controller/:action/:id" from routes.rb , i would expect that the
generated links from link_to etc. would be something like
&controller=railscontroller&action=railsaction ...
rails is doing this with additional params but i didn't find a way to
change it for controller,action,id.

what i need would be rails generated urls (links,forms) that look like
this
www.someweb.com/someweb/somepage.php?controller=railscontroller&actio...

the somepage.php would pass the params to the curl call and the rails
app would get the right information without leaving my page.

thanks for any help.

-tom
This topic is locked and can not be replied to.