To get the base url of your symfony project , you can use the below in your template file.

$sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot()

And to get your current app URL.

$sf_request->getUriPrefix().$sf_request->getRelativeUrlRoot().$sf_request->getPathInfoPrefix();

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.