Answers for "symfony get base url"

1

symfony get base url

This is now available for free in twig templates (tested on sf2 version 2.0.14)
{{ app.request.getBaseURL() }}


In later Symfony versions (tested on 2.5), try :
{{ app.request.getSchemeAndHttpHost() }}
Posted by: Guest on June-15-2021

Browse Popular Code Answers by Language