views:

114

answers:

2

Hi all,

I'm rebuilding a site for a client at the moment. The current site is in classic asp, the rebuild is in asp.net 3.5. However, the client is insisting that all the page names remain exactly the same as he is afraid of losing his google ranking (which is currently pretty good). So, I'm trying to get ASP.Net to allow me to use .asp extensions.

I've got it working well with some simple re-writing of the url, but as soon as I try to run a page which loads a User Control (using LoadControl) it's just refusing to play ball. I'm getting an error saying "This type of page is not served.". If I run the exact same page with the .aspx extension it works perfectly.

So far I've changed the mapping of .asp to point to the aspnet_isapi.dll in IIS6, which means the .asp pages hit Global.asax and I can redirect them, but can anyone advise about the User Control issue? Do I need a HttpHandler? If so I hope someone can point me to a simple example as I'm not quite that advanced with .Net as yet.

Thanks

dave

A: 

Sorry all, I think I've fixed it - seems to be a problem with the rewriting code rather than the mapping...

Apologies if I've wasted anyone's time.

dave

A: 

Hi Dave,

One option which I would use would be to write you app as you want. Maybe make use of ASP.NET MVC and it's clean URLs.

Then, once you have built the new site, make all the old asp URLs return a 301 header to the new pages.

This way, Google will transfer the accosiated page rank to the new URL and eventually, you will be able to do away with the old asp files / the URL mappings that you set up to handle them.

Greg B