KennyG
Jan 24, 2019
  2169
(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
Optimizely Forms: You cannot submit this form because an administrator has turned off data storage.

Do not let this error message scare you, the solution is quite simple!

Tomas Hensrud Gulla | Oct 4, 2024 | Syndicated blog

Add your own tools to the Optimizely CMS 12 admin menu

The menus in Optimizely CMS can be extended using a MenuProvider, and using the path parameter you decide what menu you want to add additional menu...

Tomas Hensrud Gulla | Oct 3, 2024 | Syndicated blog

Integrating Optimizely DAM with Your Website

This article is the second in a series about integrating Optimizely DAM with websites. It discusses how to install the necessary package and code t...

Andrew Markham | Sep 28, 2024 | Syndicated blog

Opticon 2024 - highlights

I went to Opticon in Stockholm and here are my brief highlights based on the demos, presentations and roadmaps  Optimizely CMS SaaS will start to...

Daniel Ovaska | Sep 27, 2024

Required fields support in Optimizely Graph

It's been possible to have "required" properties (value must be entered) in the CMS for a long time. The required metadata haven't been reflected i...

Jonas Bergqvist | Sep 25, 2024

How to write a bespoke notification management system

Websites can be the perfect vehicle for notifying customers of important information quickly, whether it’s the latest offer, an operational message...

Nicole Drath | Sep 25, 2024