0
I’m updating a website, and the Urls will change. So, I need to make a redirect 301
with web.config
, but I couldn’t. Below the code I built:
<configuration>
<location path="site-antigo">
<system.webServer>
<httpRedirect enabled="true" destination="site-novo" httpResponseStatus="Permanent" />
</system.webServer>
</location>
</configuration>
What I hoped would happen with this code:
When accessing the page http://meusite.com.br/site-antigo the user would be redirected to http://meusite.com.br/site-novo, but this isn’t happening. I’m doing something wrong?
But does it have the same effect as a 301 redirect? Google understands this?
– caiocafardo
According to the documentation, yes. But I suggest to confirm in the browser console, as it will depend on the settings made. Use
IIS Manager
tb can be very useful :)– tvdias