Im trying to build some redirects in umbraco 11.2.2
But its like they do not get picked up, and no matter what i do i see the "Page Not Found" site.
I did try to install Skybrud.Umbraco.Redirects 4.0.8 and nothing working when i create redirects.
I also try the middleware solution with:
new RewriteOptions().AddIISUrlRewrite(env.ContentRootFileProvider, "Rewrites.xml"); in startup.cs but that not working either for some reason.
Anyone have an idea what could be wrong?
It's a multilingual site and I wonder if that could be the problem because I have another single language site where all is working fine.
public static void ApplyRewriteRules(this IApplicationBuilder app)
{
using (StreamReader iisUrlRewriteStreamReader =
File.OpenText("IISURLRewrite.xml"))
{
var options = new RewriteOptions()
.AddRedirectToHttpsPermanent()
.AddIISUrlRewrite(iisUrlRewriteStreamReader);
Redirects not working.
Im trying to build some redirects in umbraco 11.2.2
But its like they do not get picked up, and no matter what i do i see the "Page Not Found" site.
I did try to install Skybrud.Umbraco.Redirects 4.0.8 and nothing working when i create redirects.
I also try the middleware solution with: new RewriteOptions().AddIISUrlRewrite(env.ContentRootFileProvider, "Rewrites.xml"); in startup.cs but that not working either for some reason.
Anyone have an idea what could be wrong? It's a multilingual site and I wonder if that could be the problem because I have another single language site where all is working fine.
Hi Thomas,
Need to call
Try the following code.
Create a new extension Method (it's your choice)
Call the created extension method
ApplyRewriteRules
before the app.UseUmbraco();Thanks, got it to work now ;-)
is working on a reply...