.htaccess file type for .asp

Discussion in 'Apache' started by ldylion214, Nov 17, 2007.

  1. #1
    Hi all,
    I'm new here. I've been told a .htaccess file won't work on my site because it is .asp. What would be an alternative that would work for me. I have an old javascript code for redirect Would something like this work to redirect my //tribeazure.com to //www.tribeazure?

    I've tested more than a few codes on my site. Here are the two my host recommends:

    <%@ Language=VBScript %>
    <%
    Response.Status="301 Moved Permanently";
    Response.AddHeader("Location","http://www.tribeazure.com/");
    %>

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

    Can anyone see anything I may have done wrong? I placed them at the top of the page. I get a 500 Internal Error. Grrr. I have no experience with this so I do need step by step.

    Thanks! Nicci
    __________________
     
    ldylion214, Nov 17, 2007 IP