spacemonkey
spacemonkey

Reputation: 19964

How to explicitly define URIs in symfony

My project is made from a couple of symfony apps. I would like to link them together through relative URIs, however, every time I define an anchor in a template and explicitly state path to another app, i.e.:

<a href="/backend">backend</a>

It gets prefixed with the current app's URI, like so:

<a href="/frontend/backend">backend</a>

What is the way to go around this?

Thanks

Upvotes: 0

Views: 40

Answers (1)

Tomasz Madeyski
Tomasz Madeyski

Reputation: 10890

Did you try to use link_to helper?

<?= link_to('backend','@nameOfBackendRoute' ?>

First parameter is text to appear between anchor opening and closing tag, second argument is name of your route from routing.yml

More info can be found here

Upvotes: 1

Related Questions