SiteCore urls without .aspx extension
Asked Answered
E

3

6

I want to have pages accessed as if they were folders. For example:

domain.com/state
domain.com/state?val=xxx

But I can only get:

domain.com/state.aspx

How do I configure Sitecore to ignore the .aspx extension?

Euthenics answered 3/2, 2011 at 17:53 Comment(0)
A
8

In Sitecore web.config, set addAspxExtension to false in LinkManager

<add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="false" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="never" languageLocation="filePath" shortenUrls="true" useDisplayName="false" />

After doing this, you also need to map wild card extensions in IIS

Agnesagnese answered 3/2, 2011 at 19:32 Comment(3)
I didn't have to map wildcards, just change the app pool to integrated mode instead of classic.Euthenics
Interesting. I would have thought the extension mapping was required also. Good to know!Tatar
Just remember running in Integrated mode using Windows or Basic authentication the pool will be very fragmented. See the "Pool Fragmentation" section here: msdn.microsoft.com/en-us/library/8xx3tyca%28v=vs.80%29.aspxRibbonfish
T
2

There are several approaches to this depending on your version of IIS. This SDN scrapbook entry covers the scenarios and provides sample code.

You can also read more about how the dynamic item URLs are generated.

Treatise answered 3/2, 2011 at 18:41 Comment(1)
I did find some useful info here. Thanks.Euthenics
T
-2

This isn't a Sitecore configuration issue, it's IIS. You need to set up your site in IIS so that ASP.NET is handling all extensions.

Here is a thread about this topic in the SDN forum.

Tatar answered 3/2, 2011 at 18:36 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.