Try our conversational search powered by Generative AI!

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

Vote:
 

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.

#200629
Jan 17, 2019 21:36
Vote:
 

I'd suggest writing a blog post for this rather than a forum post. Forum posts are more fore problems or questions than issues and solutions.

#200644
Jan 18, 2019 15:09
Vote:
 

I agree, at the time I just had a few minutes and wanted to get something out there so when I forget all about this and Google it in the future I would find the answer. Moved here-> https://world.episerver.com/blogs/kennyg/dates/2019/1/unexplained-302-redirect-that-adds-trailing-slash-check-your-filefolder-structure/ 

#200795
Jan 24, 2019 23:52
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.