简体   繁体   English

如何做Sitecore正则表达式301通过别名重定向

[英]How to do Sitecore regex 301 redirect by the aliase

Is it possible to do 301 redirect using a reg-ex string with the aliases basically what a want to do is: ordinary aliases use the statut code 200 if reg-ex aliases use the statut code 301 是否可以使用带有别名的reg-ex字符串进行301重定向,基本上是要做什么:如果reg-ex别名使用statut代码301,则普通别名使用statut代码200

how can I implement this? 我该如何实现呢? It need absolutely to pass by the aliases request of my client 它绝对需要通过我的客户的别名请求

You can't do this out of the box. 您不能开箱即用。
If you're able to customize code for the instance, you need to look into the Sitecore.Pipelines.HttpRequest.AliasResolver processor in the httpRequestBegin pipeline. 如果您能够为实例自定义代码,则需要查看httpRequestBegin管道中的Sitecore.Pipelines.HttpRequest.AliasResolver处理器。
Override that processor to add logic for resolving regular expressions in aliases. 重写该处理器以添加用于解析别名中的正则表达式的逻辑。

If you cannot customize any code, you can look into some modules that are available. 如果您无法自定义任何代码,则可以查看一些可用的模块。

301 Redirect module 301重定向模块
This one seems to support regular expressions. 这个似乎支持正则表达式。

URL Rewriter URL重写器
This one is released by me, but doesn't support regular expressions. 这个是我发布的,但不支持正则表达式。

And of course there is always the IIS URL Rewrite feature, but that lacks the ability to manage it from Sitecore. 当然,总会有IIS URL重写功能,但是缺少从Sitecore对其进行管理的功能。

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

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