301 redirect to dynamic domain

Asked

Viewed 77 times

0

Good afternoon, you guys. We have a website meusite.with and we updated it and ai domains like meusite.com? id=123 lost their "direction". How do I do 301 on these dynamic Urls on IIS?

1 answer

0

You could do it like this:

<script runat=”server”>
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = “301 Moved Permanently”;
Response.AddHeader(“Location”,”http://www.meusite.com.br”);
}
</script>

Browser other questions tagged

You are not signed in. Login or sign up in order to post.