Hi @Alex9463
Yes, you can write redirect in AEM either using AEM Redirect manager or directly at dispatcher/CDN.E.g. https://www.mysite.com/path-does-not-exists to https://www.mysite.com/new-path with 301
RewriteRule ^path-does-not-exists/?$ https://www.mysite.com/new-path [R=301,L]