One of the major concern with the AEM setup is managing the redirects and vanities without the involvement from Development team, AEM supports multiple options to enable the URL redirects & vanity paths for the website pages.
Let us see some of the standard options to manage the redirects and vanitypaths in AEM, also a cutom solution to manage the site specific redirects (301 and 302) by site admins through management UI and configuring the Apache server to auto pull the redirects without the deployment/development team involvement.
This property when set on any resource defines an alternative path to address the resource.
sling:redirect — This property when set on a resource with a vanity path causes a redirect response to be sent to the client, which causes the client to send in a new request with the modified location. The value of this property is applied to the actual request and sent back as the value of the Location response header.
sling:redirectStatus — This property defines the HTTP status code sent to the client with the sling:redirect response. If this property is not set, it defaults to 302 (Found). Other status codes supported are 300 (Multiple Choices), 301 (Moved Permanently), 303 (See Other), and 307 (Temporary Redirect).
sling:vanityOrder — It might happen that several resources in the resource tree specify the same vanity path. In that case, the one with the highest order is used. This property can be used to set such an order.