geta-notfoundhandler icon indicating copy to clipboard operation
geta-notfoundhandler copied to clipboard

Automatic redirects create redirects to/from Media

Open TheTh1rt33nth opened this issue 1 year ago • 2 comments

Platform: Optimizely 12 CMS, DXP

Good day to you! We are experiencing an Issue with Geta extension in Optimizely with Automatic redirects enabled. Automatic redirects seem to create a lot of redirects with the following structure: /contentassets/blobid/imgid.jpg Example that follows: /contentassets/e4f9c3a7d2b8e5d4c6f0ab19cdafe6c2/928471635_573602987513429_1928374650192837465_n.jpg These redirects are bloating the redirect list heavily. NotFoundHandler.ContentUrlHistory table also has multiple entries for /contentassets/... , which we expect to be the source of these automatic redirects.

Proposition: could Automatic redirect feature please account o.IgnoredResourceExtensions = new[] { "jpg", "png", "gif", "css", "js", "ico", "swf", "woff" }; configuration, and/or have an option to exclude certain paths or url patterns from automatic generation?

Thank you in advance!

TheTh1rt33nth avatar Dec 12 '24 08:12 TheTh1rt33nth

@TheTh1rt33nth

Have you seen this option?

services.AddNotFoundHandler(o => { o.IgnoreSuggestionsUrlRegexPattern = @"^(https?://[^/]+)?/(api|episerverapi|globalassets|siteassets)"; });

AndersHGP avatar Dec 12 '24 11:12 AndersHGP

Hi @Geta / Karlis,

Thanks very much for the response.

We have implemented the startup.cs that matches the example foundation project in the geta notfound github. Our startup file is slightly different to yours where we have a openid config just before.
• Do you think this could be the cause? • We have also implemented a custom 404 page in our project.

The plugin loads fine and we have just bumped the version to 5.0.10 in our non prods and it works perfectly and we will attempt to release this to production but we have only seen the caching issue in the prod as the non prod environments only have 1-2 servers max where our prod environment has 10 +. https://ourdomain.com/EPiServer/Geta.NotFoundHandler.Optimizely/container

Uploading geta.png…

Kind regards

odalton avatar Dec 13 '24 07:12 odalton