Question

Photo of Jesse Pearson

0

Previous Arena default.aspx Rock Exceptions

I heard that someone had a fix for this, a way to redirect those requests to our homepage possibly? We get several hundred a day and would love for those to stop...

  • Photo of Jim Michael

    0

    This technique was shared by Central Christian but I've shortened it up for clarity and removed their URLs to keep Google from indexing them here. The idea is to put this code into Rock's default.aspx page: 

    <%@ Page Language="C#" ContentType="text/html" ResponseEncoding="iso-8859-1" %>
    <%
    string pageId = Request.QueryString["page"];
    if ( pageId == "1234" )
    {
        Response.RedirectPermanent( "http://www.yourdomain.com/whatever" ); } else if ( pageId == "5678" )
    {
        Response.RedirectPermanent( "http://www.yourdomain.com/whatever2" );
    }
    else { Response.Redirect("http://www.yourdomain.com/");
    }
    %>


    What you want to do is change  pageID == "1234" (and 5678) to your Arena pages that you want redirected to a /whatever page on Rock. The Response.RedirectPermanent tells Google this link has moved permanently, which is important if your site has been indexed. Just add as many "else if" sections to the file as you need for each Arena page you want to point to a new equivalent Rock page. The final "else" makes any pageID you DIDN'T define to redirect to a specific page to just redirect to your homepage.


    Note that this technique only works well when you've moved from a prior system to Rock while keeping the same domain name. If you moved from www.yourolddomain.com on Arena to www.yournewdomain.com on Rock, you would need to use something else like URL rewriter in IIS to handle that more complex situation.


  • Photo of Jesse Pearson

    0

    Thank you! Will work on this soon!