301 redirects

Discussion in 'ASP.NET / ASP.NET Core' started by clincon, Oct 11, 2007.

Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.
  1. is it a problem that the rest of the site is coded in vb?
     
  2. I'm running Asp.net 1.1 on my site and am trying to figure out how to make seo-friendly 301 redirects, have any of you been through this before?

    I got this script from another site but I get an error each time I use it. Any suggestions would be really helpful.

    <script runat='server'>
    private void Page_Load(object sender, System.EventArgs e)
    {
    Response.Status = '301 Moved Permanently';
    Response.AddHeader('Location','http://www.domain.com/new-page.asp');
    }
    </script>
     
  3. You can use both C# and VB on different pages of your site.I would rather use a single language to make the site more manageable.Why don't you just change the redirect code to vb.

    Vikram

    DiscountASP.NET
    www.DiscountASP.NET
     
  4. That fixed it, thanks!
     
  5. Try changing this line from <script runat='server'> to <script language='c#' runat='server'>

    rcp
    DiscountASP.NET
    www.DiscountASP.NET
     
Thread Status:
Threads that have been inactive for 5 years or longer are closed to further replies. Please start a new thread.

Share This Page