Symfony2 functional test client force server param SERVER_NAME
问题 I designed a multiste app. There is multisite admin (ie. http://root.com/admin) and also all sites access (ie http://site1.com, http://site2.com...). To handle routing (multisite admin or child sites), I set the UseCanonicalName on vhost configuration : ServerName root.com ServerAlias media.site1.com site1.com media.site2.com, site2.com ... UseCanonicalName On Doing so, I'm sure that $request->server->get('SERVER_NAME') will always return in given case root.com, and I use this in routing