Page 1 of 1

301 Redirects Don't Work

Posted: Wed Jun 11, 2008 8:31 am
by ajasko
I just switched my domain to the AbleCommerce server to go live with my site. I have made 301 redirect pages for all the pages in my old site, to redirect the old urls to the new ones on ablecommerce. However, the redirect pages are not working because something else is being called in AbleCommerce.

For example:

I put the following redirect code in the page
http://www.telephonesystemsforbusiness. ... -P784.aspx

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


When I go to this url http://www.telephonesystemsforbusiness. ... -P784.aspx,
it does not perform the redirect but gives me this error:

Object reference not set to an instance of an object.
[NullReferenceException: Object reference not set to an instance of an object.]
ConLib_BuyProductDialog.GetSelectedKitOptions() +81
ConLib_BuyProductDialog.Page_PreRender(Object sender, EventArgs e) +18
System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +15
System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +33
System.Web.UI.Control.OnPreRender(EventArgs e) +2117788
System.Web.UI.Control.PreRenderRecursiveInternal() +86
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.WebControls.WebParts.WebPart.PreRenderRecursiveInternal() +62
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Control.PreRenderRecursiveInternal() +170
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2041

It looks like AbleCommerce is trying to do a whole bunch of prerender things that are not allowing the redirect. Is there some page template I can put the 301 redirect code on that will allow my 301 redirect pages to work?

Re: 301 Redirects Don't Work EMERGENCY!

Posted: Wed Jun 11, 2008 11:05 am
by jmestep
I didn't get an error on that page. Is it still broken?

Re: 301 Redirects Don't Work EMERGENCY!

Posted: Wed Jun 11, 2008 11:50 am
by ajasko
Yes; I did some IIS exact page redirects for a couple of pages including that one, but most of my pages still do not work, as they are running the regular 301 redirect pages which are currently having this problem.

You can see the error at

http://www.telephonesystemsforbusiness. ... -P808.aspx

for a product page or:

http://www.telephonesystemsforbusiness. ... -c148.aspx

for a category page.

There must be some way to use 301 redirect pages in transitioning your site, but I guess some sort of template must be necessary?