views:

72

answers:

2

Hi,

We have a "legacy" flash application relying on PHP to deliver it's data, but the server side is now being upgraded to Rails 3.

For various reasons we don't want to change the flash, so we need to be able to route http requests like this: http://www.example.com/somefile.php?param=123&otherone=123457 to RESTful rails routes.

I cant assume Apache is going to be used so I cant use mod_rewrite.

Does anyone know of a good solution? Rack Middleware was my first thought.

+1  A: 

Take a look at rack-rewrite. I bet you will be able to accomplish what you're looking for using it.

http://github.com/jtrupiano/rack-rewrite

You may not even need the gem. With a little parsing you can probably do what you're trying to do as your own custom Rack module.

Alex
+1 for Rack, the most fast solution available.
Simone Carletti
Thanks, exactly what I was looking for. Might still roll my own though.
Johandk