Unable to use folder paths even with ReservedPaths

I have "ReservedPaths": "~/custompath/" set up in my appsettings but attempting to go to the /custompath/ address leads to a 404 error. I also have the folder with the matching path name in my wwwroot. Is something other than putting the desired URL into the ReservedPaths list necessary in order to enable navigation to subfolder URLs?

Could you clarify what you are trying to use the reserved path for?

The reserved path property in appsettings doesn’t make anything navigable via URL. As per the official documentation entry, it just means Umbraco will leave those files untouched. If you have things in there that are meant as pages you would need to point to them yourself.

In previous Umbraco versions, I would use this line in the web.config to have the website recognize folders as pages that could be traveled to without getting the site-specific 404 page:

<add key="Umbraco.Core.ReservedPaths" value="~/custompath/" />

It’s all that was necessary to have the URL become valid, so long as the folder was in the root folder and contained the correct files (i.e., an index.html)

Gotcha ^^
So… without any handling for what to do with /custompath/ (as I assume it’s a folder with no actual view details) I would expect that one in particular to 404. If you have some static HTML files in there though I’d expect those to work. Like /custompath/index.html should work, but not /custompath/index.

Is that the case? Or does using exact endpoints in the custompath also 404?

Or do you have non-Umbraco MVC things stored in there? If that’s the case you’d probably need a controller mapping for .NET Core to know what to do with them.

I don’t know if your hosting has changed? IIS for instance has a default list of page names (like index.html) that it will try to open if you just point to a folder. However, this is not neccessary true for other hosting platforms.

Also the description of the ‘ReservedUrls’ settings says:
A comma-seperated list of files to be left alone by Umbraco, these files will be served, and the Umbraco request pipeline will not be triggered.

So it says that it’s a list of files, not folder. I could just be a deceptive description, but perhaps you can check the source code what is actually does.

1 Like

Hi, thank you for your advice! I suppose things aren’t working the way I was used to them working before, but /custompath/index.html did eventually work and put me on the correct page. As a solution, I’ve just set up a redirect manually that has (from the front end) the same effect.

1 Like