Try our conversational search powered by Generative AI!

KennyG
Jan 24, 2019
  2071
(2 votes)

Unexplained 302 redirect that adds trailing slash? Check your file/folder structure

Just a quick note for anyone experiencing something similar.

We have a client who had a concern that /resources always redirected to /resources/. After a lot of wasted time checking the web.config for rewrite rules, writing rewrite rules that didn't work, disabling the 404handler, and testing init modules (routingOptions.UseTrailingSlash) Episerver's engineering team pointed us to the actual problem. 

The site actually had a folder named Resources that contains the XML language files. After renaming the folder and updating the EPiServerFramework.config with the new path the URL worked without the redirect.

So long story short, if you are having a problem with an alias check to make sure that you don't have a folder with the same name.

Jan 24, 2019

Comments

Please login to comment.
Latest blogs
Why C# Developers Should Embrace Node.js

Explore why C# developers should embrace Node.js especially with Optimizely's SaaS CMS on the horizon. Understand the shift towards agile web...

Andy Blyth | May 2, 2024 | Syndicated blog

Is Optimizely CMS PaaS the Preferred Choice?

As always, it depends. With it's comprehensive and proven support for complex business needs across various deployment scenarios, it fits very well...

Andy Blyth | May 2, 2024 | Syndicated blog

Adding market segment for Customized Commerce 14

Since v.14 of commerce, the old solution  for adding market segment to the url is not working anymore due to techinal changes of .NET Core. There i...

Oskar Zetterberg | May 2, 2024

Blazor components in Optimizely CMS admin/edit interface

Lab: Integrating Blazor Components into Various Aspects of Optimizely CMS admin/edit interface

Ove Lartelius | May 2, 2024 | Syndicated blog