Search code examples
.htaccesssymfonyhttp-redirectforwarding

Symfony2 Homepage not under root directory


I'm developing an app, which has no "/" page. Instead of this, a english user should be forwarded to "/foo" and a german user should be forwarded to "/bar".

How would you solve this, with regards of performance? Are there symfony2 internal things I can do or would you use the .htaccess for this?

I'm using besimple/i18n-routing-bundle for i18n my routes.

Best Christian


Solution

  • From kix: "Why not just add a controller for the / route that would always return a redirect response?"

    This worked good.