1
votes

We have a folder located at this path: http://www.oursite.com/careers. There are several pages under that folder, but that path causes a layout not found page, which is expected since it's just a folder.

The client needs a vanity URL for some marketing material at the same URL: http://www.oursite.com/careers. I created an Alias, but I'm still getting the layout not found page. It's my understanding that the resolvers in the HttpRequestBegin node operate in the order that they are placed in config. The AliasResolver is well before the ItemResolver, so I would think that the alias should work, but it's not.

3
Did the publish the aliases?jammykam
yes. I've connected to both web DBs and the item is there.Scott
Have you confirmed that the target item for the alias is rendering correctly when accessed using the full URL?Christian Hagelid
For the sake of clarity. With publish the Aliases, it is about the item /sitecore/system/Aliases/careersJan Bluemink
yup, I get that. I've republished the /sitecore/system/Aliases folder and all of them work, except careers. Also, as I mentioned I've connected to both web DBs and confirmed the item is out there in the CD.Scott

3 Answers

2
votes

Are alias enabled:

<setting name="AliasesActive" value="true" />`

Are you using MVC, so are you using cshtml for your items layout?

1
votes

This looks like the alias resolver is being called after item resolver.

In this situation I would either rework the I.A so that /careers will render something, as it seems strange that you have items under content which don't have layouts.

If this is not an option, I would use an IIS urlrewrite. You can use a reg ex in the URL rewrite just to capture /careers and redirect rather than all urls with careers . More info here:

http://www.iis.net/learn/extensions/url-rewrite-module/testing-rewrite-rule-patterns

0
votes

I tend to agree with Jason Horne that this has something to do with MVC, but sill was unable to determine the root cause.

Since the items we had issues with were folders that contain child pages our solution was to create a Layout called FolderRedirector, which we set as the default layout for those folders. The layout is simply code that redirects to the first item (page) under the folder. Works like a charm.