1

I know i can get a lot of informations about the HTTP request by doing $request->getSomething, but I didn't find anything anywhere to get my domain name.

I need it for mailing, when i click on links in mails <a href="{{ path('lesseeRegistration', {'invitationToken': invitationToken}) }}" target="_blank">ici</a>, I'm redirected to http://myRoute, and I want to be redirect to http://myDomainName/myRoute. Of course I could cheat by writting staticly my domain name, but I would like solve my problem by a better way

Thanks for your help :)

1 Answers1

1

You only need to get an absolute URL. There is a twig function url. Doc here

You use it like the path function:

<a href="{{ url('lesseeRegistration', {'invitationToken': invitationToken}) }}" target="_blank">ici</a>
G1.3
  • 1,693
  • 8
  • 24