We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Generate complete URL string from relative URL

Hey guys, I am having some troubles with relative URL's. I am not sure if it is a phalcon thing or just a general web thing. Anyway, if my URL ends with a trailing slash, my relative urls work. In volt, if I do {{ url('test') }} and the current page is mysite.com/something/, then the result will be mysite.com/something/test. But if there was no trailing slash at the end of that url, it directs me to mysite.com/test instead.

The HTML element generated by the page just links to 'test'. Is there a function that will generate the entire URL instead? (mysite.com/something/test). I am using some custom routing so I can't just 'construct' the URL using the controller name, action, and paramaters.



2.6k

Sorry I thought I replied to this. No, that doesn't help at all. I think if I had a way to just geneate a complete URL it would work fine