In silverstripe Can we create Vanity URL for the member profile like "mydomain.com/john-doe"?
I tried to do it via the routes.yml but it is breaking the other URLs like admin and other frontend pages(about us).
In silverstripe Can we create Vanity URL for the member profile like "mydomain.com/john-doe"?
I tried to do it via the routes.yml but it is breaking the other URLs like admin and other frontend pages(about us).
Copyright © 2021 Jogjafile Inc.
Yes, though there's no simple yaml configuration for doing so. The easiest way to do this is probably with the silverstripe/redirectedurls module which gives you a section in the CMS for setting arbitrary URL redirections.
If that doesn't quite do what you're after, you could set up
VirtualPages for each such page - though that will clutter your sitetree somewhat (which you could alleviate by hiding those from the sitetree and setting up a customModelAdminfor managing them).