0
I’m testing the redirect in development, running the site through visual studio. And to test the redirect I added the following chunk of code to the web.config
<configuration>
<system.webServer>
<httpRedirect enabled="true" destination="https://site.com.br" exactDestination="true" httpResponseStatus="Permanent" />
</system.webServer>
</configuration>
It worked, but as I am still in development I removed the snippet, to continue the tests on the localhost, without redirecting, but this time the redirect still works even removing httpRedirect.
Someone knows how to remove httpRedirect from web.config, which has an effect.
Strange question is just to comment on this in webconfig
– novic
It seems an obvious answer, but it is not, because I tried to comment, remove, but no case the redirecting effect stopped, was permanent, paliactively I had to recreate the solution, in the visual studio in File>Open>Site and select the folder of the site, but this creates a new solution, each solution created changes the localhost:xxxxx port. This procedure I did to recreate the solution solves the problem but I see that is not the best way.
– Jonas Centenaro
Once I saw that when running the site through the visual studio, it creates a web.config in another directory but I can’t remember where it is, maybe if you locate in that other one you might have traces of that stretch and I can try to remove to solve the problem more properly. If you know the route to the site, or web.config when the visual studio is running the site, already help for this attempt.
– Jonas Centenaro
Man, you’re getting your balls mixed up! redirecting is permanent,*** this is not true**, it is something you are doing and it is difficult to know what, in relation to Visual Studio it creates a port to test but, what has to do this is normal
– novic
You think I’m lying about redirecting, I wouldn’t have asked the question if I had this problem, what am I doing? I just put the section mentioning the question, and the redirect worked, I removed the same stretch of the web.config nothing else done besides that, but the redirect didn’t stop, it keeps redirecting. Please don’t be doubting, I’m in trouble and it’s serious, you said "that’s not true", it’s true yes, some fault caused it.
– Jonas Centenaro
Look sincerity, it is not in this aspect of lying or not, what you did in your project to be redirecting is at least strange, it is not true in my view because imagine you if you removed the file redirect
WebConfig
should not have, maybe yet I am not seeing your project and you now come to say fault? aspnet failure I find unlikely. It wasn’t an attack, it wasn’t some kind of a rip-off, but there’s no such thing as a dude. Put more part of your project, explain more detailed only it becomes impossible to answer.– novic