Randomize Page Slug


#1

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.


#2

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.


#3

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.