Skip to content

Instantly share code, notes, and snippets.

@willwright82
Created July 3, 2014 13:46
Show Gist options
  • Save willwright82/c3c631840e38130cb5bd to your computer and use it in GitHub Desktop.
Save willwright82/c3c631840e38130cb5bd to your computer and use it in GitHub Desktop.
ASP.net 301 Redirect
<script runat="server">
private void Page_Load(object sender, System.EventArgs e)
{
Response.Status = "301 Moved Permanently";
Response.AddHeader("Location","http://www.new-url.com");
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment