Using a routing rule in a Symfony project the function link_to
(or url_for
) generates an url like mydomain.com/myproject/web/friendly-name.html
or mydomain.com/web/friendly-name.html
There is a smart way, alternative to write own helper, to generate urls without /myproject/web
or /web
keeping the choosen directory structure.
Updating
Finally I found the solution in the answer to this question: symfony on virtual host document root problem