6

We're currently sitting on a Symfony 1.4 implementation of our system. The system is too big to re-develop in Symfony 2 and to an over-night-switchover - the re-dev will take us probably a year. What we are thinking of doing, is to install a new Symfony 2 project which is blank, except for one task - pass-through!

The idea is that your browser ask for example.com/products... the Symfony 2 installation recognizes that it has to actually ask the old system, and it does curl or something similar to go and ask the old server on Symfony 1.4 the same question, let's say old.example.com/products... whatever that server response with (headers, cookies, etc) gets parsed by the Symfony 2 server and passed back to the browser. The browser then are none the wiser that he's actually talking to a "proxy".

We then re-develop the module called "products" in Symfony 2 and when we roll out we merely switch proxying "off" for that module. This way we stick to iterative development and we make the impact and learning curve much better on the dev team (and off course on the business).

I've contemplated mod_proxy in apache, I've thought of installing a different proxying server, but the above solution would suite us best.

Problem is, I know Fabio have done this for, I think it was vimeo.com (or some other video site) but I can't find any documentation or tutorials on how this was achieved and where I should concentrate in my research.

j0k
  • 22,600
  • 28
  • 79
  • 90
Sarel
  • 1,210
  • 2
  • 15
  • 23
  • 1
    the site was dailymotion.com, there's a bit at the bottom of [this page](http://symfony.com/blog/dailymotion-powered-by-symfony) about their migration process – JamesHalsall Jan 19 '12 at 13:08
  • Yes you're right, thanks Jaitsu for the correction. I'll have to go correct myself at work on Monday ;) – Sarel Jan 21 '12 at 18:13
  • Hi Sarel, I'm aiming to do something similar, did you manage to get this working? thanks – luliandro Sep 24 '12 at 13:18
  • 1
    @luliandro Hey Yes, we have managed to get it working. We've used a mod_rewrite approach, where we prefixed all our Symfony2 routes with /en/ (we used /en/ because we figured we could then later on begin i18n and not have to screw with URL's again). I've written a very basic (yet verbose) approach to this - not all of it worked exactly as described but you get the general idea from my post here: http://sarelvdwalt.wordpress.com/2012/04/11/migrating-from-symfony-1-4-to-symfony-2-iteratively-via-apache-rewrites/ Hope this helps!! – Sarel Sep 25 '12 at 11:34
  • hey just tried to access the blog but it is down, did you move it somewhere else? many thanks. – luliandro Oct 29 '12 at 15:40
  • @luliandro Hey sorry yes, I moved it, here's the new link to it: http://sarelvdwalt.co.za/2012/10/05/migrating-from-symfony-1-4-to-symfony-2-iteratively-via-apache-rewrites/. (couldn't do what I wanted with hosted wordpress :P) – Sarel Oct 29 '12 at 19:19

1 Answers1

4

What you're describing could be accomplished using mod_rewrite. Create conditions for each of these modules and rewrite them to the appropriate front controller.

Kris Wallsmith
  • 8,945
  • 1
  • 37
  • 25