Dynamic vanity URLs in AEM
How can we create Vanity URLs based on a query parameter to a page?
We have a URL: http://www.myhost.com/my-page?name=<firstname>.<lastname>.
We want to pretty it up to look like this: http://www.myhost.com/my-page/<firstname>.<lastname>.
eg.
http://www.myhost.com/my-page?name=john.smith
should show as http://www.myhost.com/my-page/john.smith
Am I correct in saying this is not as simple as creating a rewrite rule on apache? Possibly an AEM servlet? A servlet that uses a request filter to fetch the query parameter and form the dynamic URL and 301 redirect to new URL. I was also trying to do these with Resource resolver mappings (etc/map). Could it be done just with Resource resolver mappings (/etc/maps)?