Trailing / added with View:url()
Permalink 1 user found helpful
I'm having difficulty with View:url('/news/celebrity') that returns '/news/celebrity/'.
Why is the trailing / added?
Why is the trailing / added?
It's for SEO I believe there was an article on google about trailing slashes, you can override that per install if you want
Ah I see, I really appreciate the answer.
The trouble I can see with that is when you end up with that as the current page and you have a relative link to a page normally at the same level (or the same page) it's easy to get broken links.
/news/celebrity with a link to 'listings' (note no /)
/news/listing
page redirects to /news/celebrity/ now 'listings' goes to /news/celebrity/listings, which doesn't exist.
I got around this by ensuring all my relative links were from the site root '/' but that might not always be possible.
Of course I accept it may be configurable. Not a 'bug' just something to be aware of:-)
The trouble I can see with that is when you end up with that as the current page and you have a relative link to a page normally at the same level (or the same page) it's easy to get broken links.
/news/celebrity with a link to 'listings' (note no /)
/news/listing
page redirects to /news/celebrity/ now 'listings' goes to /news/celebrity/listings, which doesn't exist.
I got around this by ensuring all my relative links were from the site root '/' but that might not always be possible.
Of course I accept it may be configurable. Not a 'bug' just something to be aware of:-)
how are you making the links? if you do it in c5 and not manually typing it in, it should be relative to the root