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

Randomize Page Slug

Started by Lia 8 years ago · 2 replies · 594 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 Anna, 23 hours ago
2 70 2 hours ago
Support · by gtx, 1 week ago
4 233 2 days ago
Support · by Paul Hodges, 2 weeks ago
13 283 5 days ago
Support · by Anna, 3 weeks ago
9 340 1 week ago
Support · by TomW, 2 weeks ago
4 192 2 weeks ago