Programatically add redirects to /Litium/UI/settings/websites/urlredirects

Hi!

As the title says. Is it possible to add a redirect to /Litium/UI/settings/websites/urlredirects with code?

Litium version: 8.3.1

You can use this.

   using (_securityContextService.ActAsSystem())
   {
      _urlRedirectService.Create(new UrlRedirect("hej", "/hejhej")
      {
           Id = "Id",
           AppendRequestQueryString = true,
      });
   }

Thanks, bro!

Zero hits for this feature in the docs: Searchresult