Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Randomize Page Slug

Started by Lia 8 years ago · 2 replies · 526 views
8 years ago

Is there a way to add an element of randomization to page slugs without manually typing them in?

We will be creating custom landing pages for different people via Grav admin, and don't want them to be guessable.

example.com/welcome/firstname-lastname could easily be guessed by typing in other names. Ideally we would be able to randomize the entire slug, or add some extra characters to the end of the URL so that other names cannot be guessed.

8 years ago

To my knowledge there's no native way. You'd need a plugin. See the slug() function in the Grav Lifecycle. I don't for sure it's possible, but it seems reasonable.

Security through obscurity, though, is not security. If there's anything sensitive on these pages, you owe it to yourself to secure them properly.

8 years ago

Thanks, that's what I figured.

Each page would only have publicly accessible information on it, we just don't want other clients to be able to guess who else we might be meeting with. I'm leaning towards a password protected solution now, though.

Suggested topics

Topic Participants Replies Views Activity
Support · by Thomas, 1 week ago
2 53 11 hours ago
Support · by Anna, 3 days ago
2 60 13 hours ago
Support · by Justin Young, 14 hours ago
1 30 14 hours ago
Support · by Duc , 1 week ago
2 65 5 days ago
Support · by Colin Hume, 1 week ago
2 56 5 days ago