我正在寻找关于尝试更改博客URL格式以使类别SEO友好的问题的指导。Sitefinity博客URL格式
ISSUE 我想有我们的博客类URL从
https://example.com/blog/-in-category/categories/automotive
变更为
https://example.com/blog/automotive
格式:[域]/[博客]/[类别]
我已经添加了一个自定义博客提供程序,并可以使用上述格式访问类别,但是,分层小部件仍会显示原始网址。 我确实添加了出站重写规则,该规则确实将小部件URL更新为正确的格式,但它杀死了Sitefinity后端(无法访问页面,博客文章内容)。的ScriptResource.axd WebResource.axd的和通过404
这里是出约束规则..从后端
<outboundRules>
<rule name="Cat Rewrite Rule">
<match filterByTags="A" pattern="/blog/-in-category/categories/([^$]+)" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false">
<add input="{URL}" pattern="\.axd" negate="true" />
</conditions>
<action type="Rewrite" value="/blog/{R:1}" />
</rule>
<preConditions>
<preCondition name="IsHtml">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html"/>
</preCondition>
</preConditions>
</outboundRules>
错误试图访问该页面时:
威尔自定义博客分类标准评估器解决了我需要完成的任务(我不知道该怎么做)?
感谢您的帮助!
谢谢!在我的规则中添加了(preCondition =“IsHtml”)并且工作正常。谢谢。 –