简体   繁体   中英

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

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.
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
This one seems to support regular expressions.

URL Rewriter
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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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