could you help me with following questions.
How do i get the:
absolute/relative current url
- http://www.example.com/subdir/controller/action
- /subdir/controller/action
absolute/relative application url
- http://www.example.com/subdir/
- /subdir/
I could of course use native php to get it but i think i should rather use ko3 functions.
Any idea how that works?
Thanks in advance!
Tried to make a controller that outputted them all correctly. Let me know if any of them are off.
Outputs this:
Technically speaking, it’s actually only the first page url that is a real relative url, since all the others either start with
/orhttp://.Needed to get the url for the current page myself, so decided to extend the url class. Thought I could share it here. Let me know what you think 🙂