URL shortening can be done using Sling Resource Resolver Factory if you need to use simple rules, such as removing numerous subfolders from the URL string or using Sling Mapping for more complex scenarios.