Printable Version of Topic
Click here to view this topic in its original format
Jcink.com Forums > General Support > Access Issue w. Domain Name


Posted by: MaddOryxite Jan 9 2018, 09:26 PM
I finally figured out the problem, but I'm not really sure how to fix it.

I have a category that's set to "hidden from forumhome list - can access via URL - removed from forum jump." The subsections are all set so members have permission to read. I was testing it out and apparently some members can see and some are being denied access. Turns out some of them are using our original .jcink URL, others are using the .org URL. People on the .org can see when I link to the .org page; people on .jcink can see when I link to the .jcink page. Otherwise, it's access denied.

I went ahead and tested this with other (visible) member-only sections of the forum, as well. Same issue. They only have access when given a link with their in-use domain URL.

Is there some sort of setting I need to activate so that I can use either link and all members will have access, regardless of which URL they're using? Or some redirect function to get everyone on the same URL? (I am using namecheap)

Posted by: multiplicity! Jan 10 2018, 12:02 AM
    They aren't logged in when they access a different url. They have to log in again on the .jcink if they are redirected away from .org.

Posted by: MaddOryxite Jan 10 2018, 12:18 AM
QUOTE (multiplicity! @ Jan 10 2018, 02:02 PM)
    They aren't logged in when they access a different url. They have to log in again on the .jcink if they are redirected away from .org.


I mean that is a fix, but it's not the most convenient to ask all my members to log into both domains http://files.b1.jcink.com/html/emoticons/unsure.gif

Posted by: owl Jan 10 2018, 04:54 PM
Sounds like those categories need to be hidden from guests, as well.

In terms of them needing to log in both places, if both domains are used there's no way around that - I suspect it has something to do with the way cookies are used in general, but at any rate that's how it is.

What I do to combat is two things:

1. Make sure literally all links go to your custom domain so that people are not unknowingly being routed to a new domain - it's confusing. This is a sort of tedious manual process, but it's worth it for your members.

What I do, is use relative URLS. So, for instance, if i was linking to this thread on this board instead of

CODE
https://forum.jcink.com/index.php?showtopic=29021


I'd use

CODE
/index.php?showtopic=29021


As long as you're linking to something that's on the same domain the browser will fill that part in for you. If you can't manage that it's just best to use your custom domain, but you'd have to change it back if you ever lose that domain.

2. Use a code on the index that re-routes anyone who was using the wrong domain. They still have to log in, but only once at the beginning and that's much less confusing.

Posted by: John Jan 10 2018, 05:38 PM
QUOTE (owl @ Jan 10 2018, 05:54 PM)
In terms of them needing to log in both places, if both domains are used there's no way around that - I suspect it has something to do with the way cookies are used in general, but at any rate that's how it is.


This is correct. It is not a Jcink issue, it is a browser security feature. One domain or subdomain can never read cookie or login data from another. If this was possible, well, that would be one huge security hole.

Besides the approach suggested by owl, you could also setup your domain to simply redirect to your jcink.net name -- although this is less pretty.

We can also provide a script that will detect if a user is on the jcink subdomain and redirect them to your primary domain.

This issue is basically one that should solve itself in time as you push your domain as the primary link and remove references, at least within your layout, to the old subdomain.

Posted by: MaddOryxite Jan 10 2018, 06:42 PM
I really like owl's link suggestion so I definitely will be going around changing the links as such, but could you also provide me with the script to redirect to the primary domain? A good chunk of my member base is not tech savvy and anything I can do to help automate a process is extremely helpful.

EDIT: So I guess the relative links don't work with bbcode? That's fine; I can work around it. Just wondering if that's absolutely the case or if I need to be using html for that to work

Posted by: John Jan 10 2018, 07:17 PM
They currently don't for the links in posts, unfortunately. HTML links are necessary.

Posted by: MaddOryxite Jan 10 2018, 08:54 PM
QUOTE (John @ Jan 11 2018, 07:38 AM)


We can also provide a script that will detect if a user is on the jcink subdomain and redirect them to your primary domain.


That's fine! Could I have the script for this? ^

Posted by: John Jan 12 2018, 12:41 PM
Yes here it is, but actually, this is probably not good for you now that I see it.

CODE
<script>
if(window.location.hostname == 'your.jcink.net') {
document.location='http://yourdomain';
}
</script>


This script just redirects to the root domain name no matter, rather than linking them to the page they were looking at. Let me try to see if there's a better way of doing that.

Posted by: owl Jan 12 2018, 04:08 PM
Hmm, there might be some way to have that only trigger on the index, or something? I think I used to have one set up like that, but I since lost the domain so I removed the code without backing it up.

'
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)