code_junkie

How to redirect siteA to siteB with A or CNAME records

Nov 10th, 2011
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. subdomain.hostone.com --> subdomain.hosttwo.com
  2.  
  3. <?
  4. Header( "HTTP/1.1 301 Moved Permanently" );
  5. Header( "Location: " );
  6. ?>
  7.  
  8. <%@ Language=VBScript %>
  9. <%
  10. Response.Status="301 Moved Permanently"
  11. Response.AddHeader "Location","http://subdomain.hosttwo.com"
  12. %>
  13.  
  14. <script runat="server">
  15. private void Page_Load(object sender, System.EventArgs e)
  16. {
  17. Response.Status = "301 Moved Permanently";
  18. Response.AddHeader("Location","http://subdomain.hosttwo.com");
  19. }
  20. </script>
Add Comment
Please, Sign In to add comment