xml 简单的配置文件更改,以确保Sitecore Urls的格式很好,用连字符( - )替换空格(%20)。请注意,这也包括

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了xml 简单的配置文件更改,以确保Sitecore Urls的格式很好,用连字符( - )替换空格(%20)。请注意,这也包括相关的知识,希望对你有一定的参考价值。

<!-- 
Change 1:
To have spaces be changed to hyphens, you need to edit Sitecore’s web.config and tell it to replace " " with "-". In the "encodeNameReplacements" node, we add the final "replace" node seen below. 
-->

<encodenamereplacements>
   <replace mode="on" find="&amp;" replaceWith=",-a-," />
   <replace mode="on" find="?" replaceWith=",-q-," />
   <replace mode="on" find="/" replaceWith=",-s-," />
   <replace mode="on" find="*" replaceWith=",-w-," />
   <replace mode="on" find="." replaceWith=",-d-," />
   <replace mode="on" find=":" replaceWith=",-c-," />
   <replace mode="on" find=" " replaceWith="-" />
</encodenamereplacements>

<!-- 
Change 2:
Because of this change, whenever someone requests a page with a hyphen, Sitecore is going to assume that it needs to be translated to a space which will cause issues so you also need to configure Sitecore to not allow content managers to use hyphens in their Item names. Change is again made in the web.config file.
-->

<setting name="InvalidItemNameChars" value="\/:?"<>|[]-/>.

以上是关于xml 简单的配置文件更改,以确保Sitecore Urls的格式很好,用连字符( - )替换空格(%20)。请注意,这也包括的主要内容,如果未能解决你的问题,请参考以下文章

如果sitecore中的先前版本没有更改,如何以编程方式删除新创建的项目版本

Sitecore - 以编程方式清除用户的缓存

Sitecore 6 是不是可以在已登录时更改虚拟用户的角色?

sitecore 中的访问查看器和安全编辑器有啥区别?

将大文件上传到 sitecore 媒体库

sitecore-CMS