isapiisapi-redirect

ISAPI Rewrite syntax help for redirecting from .htm page to .aspx page


I want to rewrite(301 redirect) www.mydomain.com\default.htm to www.mydomain.com\HomePage.aspx. This way I need to do for each htm page in my site to different aspx page.


Solution

  • RewriteEngine on
    RewriteBase /
    RewriteRule default.htm /HomePage.aspx [I,U,L]
    

    I think this will do, but if you are running on IIS you could also take a look into URL Rewrite Module 2.0

    I think i got the flags wrong: RewriteRule Default.htm HomePage.aspx [NC,R=301,L]

    Should do the trick. Nethertheless ISAPI_Rewrite is quite well documented at "ISAPI Rewrite Examples"