views:

279

answers:

2

Hello,

Recently I'm working on a refactor project from asp to asp.net 3.5. There are lots of .html file uses .inc file for the header and footer in the old site, and needed to be converted to .aspx uses master page.

My problem is, for search engine and for bookmark those old pages are all gone Therefore I need to redirect the old .html pages to .aspx. I've been trying to find a way to fix that, finally i found ISAPI_Rewrite might be the tool that i can use. After a few hours reading the document on the site, i still have no clue how to write the syntax at all :(

Could anyone give a some examples please? ex. rewrite all urls under www.example.com/en to www.example.com/ rewrite all .html to .aspx

The server is using Windows 2000, IIS6, ISAPI_Rewrite 3 Lite

Thanks in advance

ben :)

A: 

You can use wildcard mappings in IIS 6. This will allow you to write your own HTTP handler to handle the rerouting of requests to the HTML pages to ASPX pages if you'd find that easy.

You could also look at urlrewriter.net which you may find easier to work with.

http://urlrewriter.net/index.php/support/installation/windows-server-2003

Mark
THX I'll give it a try :)
ben
A: 

Please consider using the following rule:

RewriteRule ^/en/(.*)\.html$ /$1.aspx [NC,R=301,L]
TonyCool