Click here to Skip to main content
15,123,118 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,I have bought an HTTPS and need to redirect from http to https,But I have already redirect to https. However I got an email from google saying that<<Googlebot can't access your site>>
I learned about:
Using 301 Page Redirects
from this godaddy link http://support.godaddy.com/help/article/234/using-301-page-redirects[^]

the godaddy link explain about 301 Page redirects and give this code to put in your code:

XML
<script language="c#" 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>


But the problem I got is where I have to put this code in my Code
They are saying to put in web page and save as Oldpagename.aspx but up
they giving this note:
NOTE: In the code examples below, replace "oldpagename" with the name of your old Web page from which you want to redirect traffic and replace "newpage.html" with the name of the new Web page to which you want to redirect traffic.

My kestion is how to redirect to an https step by step.
need help from....
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900