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,
      });
   }
2 Likes

Thanks, bro!

Zero hits for this feature in the docs: Searchresult

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.