merged branch Tobion/redirect-subdir (PR #530)
merged branch Tobion/redirect-subdir (PR #530)

This PR was merged into the 2.2 branch.

Discussion
----------

fix redirect when project is installed in subdirectory

When neither a vhost with proper document root nor an apache alias is configured, the redirect was to the wrong location (without the path prefix). The context_prefix env variable was not available then, so we need to use the logic to determine the RewriteBase automatically as we have done it to resolve the app.php file too.

BC break: no
fixes: https://github.com/symfony/symfony-standard/pull/497#issuecomment-16016232 and following

Commits
-------

3a4f0e7 fix redirect when project is installed in subdirectory

Ocramius/symfony-standard,javiereguiluz/symfony-standard,pocit/ExpoApiBundle,umpirsky/symfony-standard,AlexeyKupershtokh/symfony-standard,wachterjohannes/sulu-standard,mayeco/symfony-standard-pagodabox,simonjcarr/symfony_rest,FLM/uberstrap,Koc/symfony-standard,yhoiseth/notelite.net,skafandri/blog,tristanbes/symfony-standard,uttam-vi/pardawala,black-project/black-standard,yelmontaser/symfony-standard,fduch/symfony-standard-workflow,Baachi/symfony-standard,jbdelhommeau/symfony-standard,zanderbaldwin/symfony-layers,taylankasap/symfony-standard,b00giZm/symfony-boilerplate-app,fahadonline/sulu,cordoval/symfony-gae,taylankasap/symfony-standard,theodo/theodo-kata,phiamo/symfony-bootstrap,Soullivaneuh/symfony-standard,phiamo/symfony-bootstrap,spolischook/standard-edition,vincentchalamon/phpunit-bridge,debruyne0/symfony,vincentchalamon/phpunit-bridge,phospr/symfony-starter,Tobion/symfony-standard,NoUseFreak/StandardEdition,jbdelhommeau/symfony-standard,symfony-cmf/standard-edition,fahadonline/sulu,tiagobrito/ds1.sfdaypt14,dunglas/symfony-standard,lyrixx/symfony-standard,aerrasti/iemedebe,symfony/symfony-standard,HasClass0/standard-edition,symfony/symfony-standard,Tobion/symfony-standard,uttam-vi/pardawala,RuntyCybin/symfony-standard,NoUseFreak/StandardEdition,egeloen/symfony-standard,jakzal/symfony-standard,UxorialRook/symfony-standard,IgorTimoshenko/symfony-standard-requirejs,continuousphp/symfony-skeleton,MatthieuCutin/ligue-squash,GulDmitry/music-diff,ybutb/videotask,GulDmitry/music-diff,zanderbaldwin/symfony-layers,cordoval/demo-symfony2-argentina,jakzal/symfony-standard,ewgRa/symfony-standard,gencer/symfony-standard,bionic-university/alexander-pobereznichenko,Spea/symfony-standard,liip-forks/symfony-standard,0mars/symfony-standard-issue-13291,the-software-factory/superhero-api,Clastic/StandardEdition,symfony-cmf/standard-edition,fduch/symfony-standard-workflow,WolfMicrosystems/symfony-wms,propelorm/symfony-propel-edition,cordoval/symfony-gae,trsteel88/symfony-standard,baukaman/NeedYou,chrisciampoli/cleats,glavweb/symfony-standard,Soullivaneuh/symfony-standard,achrafYne/restaurants-guide,mweimerskirch/symfony-standard,cordoval/symfony-bootstrap,stof/symfony-standard,yelmontaser/symfony-standard,fahadonline/sulu,lyrixx/symfony-standard,Chill-project/Standard,dantleech/symfony-doctrine-phpcr-edition,sandello-alkr/symfony,tarasinio/weather-remainder.com,bshaffer/symfony-standard,AlexeyKupershtokh/symfony-standard,lanthaler/sfHydraDemoApp,irro/MastoAlliance,Cartesia/01,SymfonyId/Skeleton,spolischook/standard-edition,dkarvounaris/symfony-standard,makasim/LiipImagineBundleSandbox,vincentaubert/symfony-standard,skafandri/blog,ucay/Skeleton,vincentaubert/symfony-standard,continuousphp/symfony-skeleton,havvg/symfony-propel-edition,umpirsky/symfony-standard,bshaffer/symfony-standard,kmelia/fresh-symfony,fahadonline/sulu,kmelia/fresh-symfony,apnet/symfony-standard-edition,havvg/symfony-standard-propel,orodsem/trout,HasClass0/standard-edition,papaavola/symfony-standard,myroshnychenko/SymfonyCMF,havvg/symfony-propel-edition,Metabor/Start-App,xabbuh/symfony-standard,drufony/drufony,SymfonyId/Skeleton,cordoval/spike-edition,pjcdawkins/tmp-symfony-demo,mweimerskirch/symfony-standard,platformsh/platformsh-example-symfony,cordoval/symfony-gae,rajkamalganeshvivid/symfony-standard,formapro-forks/api-basic,proteichik/testApp,tarasinio/weather-remainder.com,fabpot/symfony-standard,apnet/symfony-standard-edition,OskarStark/symfony-standard,phiamo/symfony-bootstrap,continuousphp/symfony-skeleton,ovelasquez/ussi,Knouki/Jobeet-Symfony,OskarStark/symfony-standard,phiamo/symfony-bootstrap,ovelasquez/ussi,gencer/symfony-standard,liip-forks/symfony-standard,continuousphp/symfony-skeleton,xiaobudongzhang/symfony-standard,tiagobrito/ds1.sfdaypt14,bamarni/symfony-docker,mkrauser/symfony-dump-demo,Spea/symfony-standard,phospr/symfony-starter,tarasinio/weather-remainder.com,havvg/symfony-standard-propel,kucherevskyA/kucherevskiy-test-task,WolfMicrosystems/symfony-wms,cordoval/symfony-bootstrap,gnugat-legacy/symfony-empty,checat/symfony-minimal,glavweb/symfony-standard,Baachi/symfony-standard,ucay/Skeleton,unewochialat/symfony-standard,formapro-forks/api-basic,phiamo/symfony-bootstrap,uttam-vi/pardawala,b00giZm/symfony-boilerplate-app,propelorm/symfony-propel-edition,elcodi/symfonycon-demo,trsteel88/symfony-standard,bocharsky-bw/symfony-standard,pjcdawkins/tmp-symfony-demo,egeloen/symfony-standard,ucsf-ckm/symfony-emberjs-edition,outlandishideas/symfony-standard,Cartesia/01,xiaobudongzhang/symfony-standard,mnapoli/symfony-standard,dkarvounaris/symfony-standard,aprezcuba24/symfony-standard,sulu-io/sulu-standard,debruyne0/symfony,GulDmitry/music-diff,fabpot/symfony-standard,bocharsky-bw/symfony-standard,shamcode/symfony-testing,wachterjohannes/sulu-standard,shadowtje1990/symfony_todo_api,platformsh/platformsh-example-symfony,ctrl-f5/symfony-standard,aerrasti/iemedebe,Cartesia/01,kmelia/fresh-symfony,sulu-io/sulu-standard,InkApplications/barenaked-symfony,HumanBooster/Symfony,sulu-io/sulu-standard,javiereguiluz/symfony-standard,bamarni/symfony-docker,ucay/Skeleton,gnugat/symfony-empty,the-software-factory/superhero-api,kosintwong/symfony_test,IgorTimoshenko/symfony-standard-requirejs,Chill-project/Standard,ybutb/videotask,theodo/theodo-kata,ucsf-ckm/symfony-emberjs-edition,orodsem/trout,papaavola/symfony-standard,tomat/symfony-standard,wachterjohannes/sulu-standard,b00giZm/symfony-boilerplate-app,by-examples/symfony-standard,GulDmitry/music-diff,simonjcarr/symfony_rest,yhoiseth/notelite.net,phiamo/symfony-bootstrap,twisted-socket/stage-plots,rajkamalganeshvivid/symfony-standard,lmaslowski/sf2,ovelasquez/ussi,MatthieuCutin/ligue-squash,cordoval/symfony-bootstrap,black-project/black-standard,dunglas/symfony-standard,irro/MastoAlliance,baukaman/NeedYou,UxorialRook/symfony-standard,shamcode/symfony-testing,ewgRa/symfony-standard,Rvanlaak/symfony-standard,SymfonyId/api-platform,tarasinio/weather-remainder.com,NoUseFreak/StandardEdition,orodsem/trout,shadowtje1990/symfony_todo_api,stof/symfony-standard,markitosgv/DevOps,cordoval/symfony-bootstrap,we-bridge/symfony-admin,proteichik/testApp,unewochialat/symfony-standard,ctrl-f5/symfony-standard,RuntyCybin/symfony-standard,1ed/symfony-standard,Clastic/StandardEdition,apnet/symfony-standard-edition,tristanbes/symfony-standard,twisted-socket/stage-plots,Clastic/StandardEdition