Buntin1
New Creator

Need to redirect 403 errors

 

We have a situation where there can be an page sharing the same url of a folder.  This is due to a couple of factors including extentionless url that we have implemented.  For example:  A content creator creates a page with name "Test Page" and a folder called "Test-Page" within the same directory.   A request to page "Test Page" is made which gets renamed to "Test-Name" which then collides with the folder "Test-Name" resulting in a 403 error.   The folder is "intercepting" the request to the page. 

I’ve looked into a couple of solutions.  One is preventing the creation of a folder that would collide with an existing page.  This solution will not work because the inability to run code when a folder is created.    

Now I’m looking into a way to perhaps redirect all 403 errors.  The redirection would be to the same url but adding the .aspx extension to the end.  After researching this can Not be achieved through a rewrite in IIS.  Does Crownpeak have a way to capture and redirect reponses based on the error code? 

0 Kudos
2 Replies
kensnyder
Head of Support

Because the CMS is code agnostic, it will not be aware that you are using extensionless urls.  The internal validation is to prevent duplicate assets, so as you noted it will allow Test Page and Test-Page to co-exist.  The easiest solution is to provide validation on the asset name in the post_input.aspx to prevent the user for naming an asset to the same thing as an existing folder.

 

--


Ken Snyder
VP, Customer Support & Cloud Operations

## If I’ve helped, accept this response as a solution so that other’s can find is more quickly in the future.
## Have thoughts on Crownpeak products? We'd love to hear them. Speak with the Crownpeak Product Team..

0 Kudos

I already thought about the validation solution.  But in our particular case the folder was created after the asset and I'm not able to add validation when creating a folder. 

0 Kudos