URGENT: Process html pages as aspx pages.

J

jainamber

Hi,
We are in the process of launching a new asp.net site for our
client, the old site was pure html. In order to preserve the search
engine rankings of the html pages, I am trying to implement 301
redirects for the individual html pages by adding the redirect code (it
has to be done on a page by page basis) in the Session_Start event.

The steps that I took for implementing this are:

a) In IIS, I added .htm and .html to the 'configuration' section and
assigned the aspnet_isapi.dll to process those pages. I was hoping that
this change will make it work, as I did a similar thing in the past for
html -> aps site migration.

b) I changed the machine.config and added the following 2 rows for .htm
and .html in the <httphandlers> section.

<add verb="*" path="*.htm" type="System.Web.UI.PageHandlerFactory"/>
<add verb="*" path="*.html" type="System.Web.UI.PageHandlerFactory"/>

I am using System.Web.UI.PageHandlerFactory because the aspx pages were
using the same.


But the Session_Start event is still not getting called for html pages.

Can any one help me with this problem, the site launch is tomorrow.

Thanks,

Amber
 
K

Kevin Spencer

You will have to do redirects from the existing HTML pages to the ASP.Net
pages. All you have done is to tell the web server to process .htm pages
with the ASP.Net ISAPI.

--
HTH,

Kevin Spencer
Microsoft MVP
Short Order Coder
http://unclechutney.blogspot.com

The devil is in the yada yada yada
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top