Posting links

resolve incorrect redirects when posting links while logged in.

Overview

The issue occurs because the linked page's permissions restrict access to registered users only, causing a redirect to the homepage with an error when logged in.
Use relative URLs without fully qualified prefixes for internal links and ensure the target page's permissions allow access for logged-in users.

Answered
ct ctweed 29 Feb, 2020
I'm having trouble with posting links in an article. If I post a fully qualified url, https://www.example.com for example, clicking it behaves differently according to if I'm logged into the site or not. If not, it behaves as expected. If I'm logged in, it does a weird redirect to the site home page which pops up a message saying "You are not allowed to view this resource".
​
Also, what exactly should you be putting in these for url's a) In the site itself (outside the forums) and b) other topics/posts within the forums? I'm thinking of what prefix you'd use, leading slashes, "http" etc. If there are any docs on all this I'd really appreciate a pointer to them, thanks.
he healyhatman 29 Feb, 2020
1 Likes
Your permissions are probably set to only allow registered users to view the page you're linking to.
​
There shouldn't be any need to use a fully qualified URL just use a relative one.
ct ctweed 04 Mar, 2020
Answer
Testing here on this board:
​
FAIL External, no prefix: Google (entered "www.google.com")
PASS External, fully qualified: Google (entered "https://www.google.com")
FAIL Relative elsewhere on site: FAQ (entered "faqs"
PASS Relative elsewhere on site: FAQ with leading slash (entered "/faqs")
PASS Relative elsewhere in forums (entered "forums/posts/t108085/avatar-png-transparent-background")
PASS Relative elsewhere in forums with leading slash (entered "/forums/posts/t108085/avatar-png-transparent-background")

All as expected so it must be my site.
This topic is locked and no more replies can be posted.