简体   繁体   English

内容ID的Umbraco网址

[英]Umbraco url by content id

I have a normal Umbraco project with standard urls ie: 我有一个带有标准网址的普通Umbraco项目,即:

mydomain.com/contact/ mydomain.com/about/ mydomain.com/contact/ mydomain.com/about/

But content in Umbraco also have ID's, so if I navigate to: 但是Umbraco中的内容也具有ID,因此,如果我导航到:

mydomain.com/1316.aspx mydomain.com/1316.aspx

The above will still give me a live page with content, how do I disable this so there are no aspx pages except the standard ones I create? 上面的内容仍然会为我提供一个包含内容的实时页面,如何禁用此功能,因此除了我创建的标准页面之外没有aspx页面?

I'm sorry this question is vague, I'm not so sure where to look or what information I'm really looking for. 抱歉,这个问题含糊不清,我不确定在哪里查找或我真正在寻找什么信息。

Any help would be greatly appreciated, a link to the relevant documentation would be sweet too as I can't seem to find any of relevance. 任何帮助将不胜感激,相关文档的链接也将很贴心,因为我似乎找不到任何相关性。

So, I managed to fix this fairly easily actually by delving into the umbracoSettings.config 因此,我通过研究umbracoSettings.config设法相当容易地解决了这个问题

Inside of here you'll find a setting like the following: 在这里,您会发现类似以下的设置:

<web.routing
     trySkipIisCustomErrors="false" internalRedirectPreservesTemplate="false" disableAlternativeTemplates="false" disableFindContentByIdPath="false"
     umbracoApplicationUrl="">
</web.routing>

Simply set disableFindContentByIdPath to true. 只需将disableFindContentByIdPath设置为true。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM