开发者

ISAPI Rewrite rule help ( .html -> .aspx )

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 proble开发者_如何学Pythonm 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 :)


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


Please consider using the following rule:

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

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜