Getting redirect loop when adding a redirect in UrlRewriting.config
Hello.
I've added a couple of Url Redirects in my UrlRewriting.config, and they are now causing loops on my website. I'm new to umbraco, so I didn't research properly.
So far it's only on local, but I can't seem to find a way to delete the redirect, even though it's not in the UrlRewriting.config.
My UrlRewriting is currently empty again, and my url will look like this if I try to access my site:
<?xml version="1.0" encoding="utf-8"?>
<urlrewritingnet xmlns="http://www.urlrewriting.net/schemas/config/2006/07">
<rewrites>
<!--
URLRewriting.net is obsolete and will be removed from Umbraco in the future.
If you want to do rewrites, make sure to use IIS URL rewrite: https://www.iis.net/downloads/microsoft/url-rewrite
The advantage of using IIS rewrite is that it is much faster, much less CPU intensive and much less memory intensive.
-->
</rewrites>
</urlrewritingnet>
Not sure what config you're looking for, but this is my UrlRewriting, in which I initially added a couple of lines, but have since deleted - although that hasn't helped..
Ah maybe I'm getting confused: I usually configure them on the web.config with rewriteMaps and rules both (either straight on the web.config or on a separate file):
Was sure I had already cleared it, but I guess I hadn't.
Any suggestions as to how I should redirect localhost:55151 to /index then?
Because opening it it'll just give me the error that there is no template to render at "/"
I've had the same problem. First of all make sure that your redirects are not being cached. You can try hard refresh in Chrome, but to be 100% sure I like to use curl from git bash. Then if you could post your rewrite rules we can have a look at them.
Getting redirect loop when adding a redirect in UrlRewriting.config
Hello.
I've added a couple of Url Redirects in my UrlRewriting.config, and they are now causing loops on my website. I'm new to umbraco, so I didn't research properly.
So far it's only on local, but I can't seem to find a way to delete the redirect, even though it's not in the UrlRewriting.config.
My UrlRewriting is currently empty again, and my url will look like this if I try to access my site:
Other subsites still working, like about page, contact etc.
I was trying to redirect localhost:55151/ to localhost:55151/index , because localhost:55151/ was empty and didn't redirect to an index/home page.
Hi Pedman
May you can post the configuration ? Also I prefer to use IIS rewrites because they are faster.
Dave
Not sure what config you're looking for, but this is my UrlRewriting, in which I initially added a couple of lines, but have since deleted - although that hasn't helped..
I thought they were the same !?
Did you restart your web application after making those changes ? Maybe clear your browser cache. Some browsers cache redirects.
Dave
Hi Stefano,
They are not the same. IIS redirects are managed by the server. So are done before Umbraco kicks in.
UrlRewriting.NET is software based. So it will happen when the request hits your application.
Also in future versions of umbraco UrlRewriting.NET will be removed.
dave
Ah maybe I'm getting confused: I usually configure them on the web.config with rewriteMaps and rules both (either straight on the web.config or on a separate file):
Which I think is the same as doing it on iis.
Hi Stefano,
That's what i meant with IIS rewrites.
But Umbraco also ships with a library that can do redirects and has a seperate config file in the Config folder
Dave
Clearing cache did the trick for the loop error.
Was sure I had already cleared it, but I guess I hadn't.
Any suggestions as to how I should redirect localhost:55151 to /index then? Because opening it it'll just give me the error that there is no template to render at "/"
Oh, and thank you for the help :)
It's always the cache!
How about
Didn't test it but should do it!
Thank you very much, that did it :)
I've had the same problem. First of all make sure that your redirects are not being cached. You can try hard refresh in Chrome, but to be 100% sure I like to use
curl
from git bash. Then if you could post your rewrite rules we can have a look at them.is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.