URL path for admin panel with login?

Hello, i currely have a adminpanel with mydomain.com/admin - however, how i have it so if im not the role “admin” i will be redirected to the index page. What i would like to do is instead redirect to a path like mydomain.com/admin/signin. How can i go about doing this?

My first idea was to hide everything if user is not admin and show a group called “login” instead and change the url to mydomain.com/admin/signin, but i don’t know how secure that is? Is that how websites are usually built or?

You could maybe just - in the workflow - only load the page if the user is signed in - and if not - redirect to index?

but i need the staff to be able to sign in to see the dashboard? and that’s what i have right now

Bumping this


You can use URL paths.

When page is loaded and current user is signed out OR when page is loaded and current user type is not admin → go to page (arbitrary text: page/signin)

Then put a conditional on the Group Signin when → Get data from URL (path segments as a list) item # 2 is signin, this element is visible

1 Like

Hey thanks! Could you possibly share some screenshots?

I have several sites like this with an Admin panel and I do what this answer says.

I always have a conditional that checks whether the Current User is signed out. If they are they are redirected to a Login panel of some sort. Once logged in, the conditional then checks if the Current User’s role is “Admin” (or some other appropriate phrase) and if so, then routes them to the Admin panel, or let’s them see the Admin panel.

If a user is logged in and somehow makes it to the Admin panel, but is NOT an Admin role, they are immediate logged out and redirected back to the Login panel (or wherever else is appropriate).

Dan Underhill

1 Like

@Orbit Google/YouTube URL Paths Segments. Neil Pearce and Matt Neary has tutorials on this which is what helped me

This topic was automatically closed after 70 days. New replies are no longer allowed.