Protect whole site with login?
-
If you've removed find/access privileges for guests, then
/recent
shouldn't show anything. If it does, then it's showing topics from categories that guests have access to.Either way, you'll probably want to add a snippet in your custom HTML (or in a footer widget) to check for user session and redirect. This will work even on other routes like /recent.
-
@osirisguitar Just go to Admin -> General -> Navigation, click on the Recent icon (the clock) and turn on "Only display to logged in users"
-
@Bri I think he already did that. That just removes the icon from the header. His point is... users can still type the url in the address bar (mysite.com/recent) for recent route to access it.
-
You can make an ugly .htaccess file / Nginx conf! I guess that sucks
-
@Jenkler How would you make a .htaccess that knows if the user is logged in?
-
.htaccess does not work that way! You are logged in until you close the browser.
-
@pichalite I'm doing this exact thing on my forum, so I know it's possible to do without using a script or .htaccess file...
I'm pretty sure if you've disabled guest access for all categories, even if navigating directly to
/recent
, an anonymous user would not be able to see it.EDIT: @osirisguitar did I misunderstand? was your intent to disallow guest viewing of /recent? or to redirect any protected endpoint?
-
@Bri No, you understood right. I just want to disable /recent (and basically everything else except /) for anonymous users. And I've disabled guest access to both navigation and all categories (but you can still access it as anonymous)
-
So something like this, right?
-
ive done something like this, change the links in navigation to require to be logged in. only link i have on my main forum, is the login link, everythign else is taken away