Monday , 24 June 2024
Breaking News

ISAPI Rewrite in ASP.NET

The ideal way to do rewriting for ASP.NET is use both ISAPI in combination with a .NET modue. ISAPI rewrite gives that edge of power over IIS that a class inside ASP.NET can’t, so urls can look like directories (‘/’) rather then .aspx pages, plus the ISAPI rewrite configuration file is very convenient and configurable. The .NET module comes in handy to rewrite the url from a dynamic location to the real location of the page and is able to resolve all the ~/ virtual directories in the process.

Example of implementing ISAPI Rewrite module on ASP.NET applications

Request comes to:
ISAPI rewrites to:
.NET module watches for requests to request.aspx and does an ASP.NET Context.RewritePath() to the real content page location of
This then causes Content.aspx to render ‘as if’ it was at the requested location eg. so all the virtual paths are correct in the requesting browser.

What is the advantage of implementing URL Rewriting with ISAPI Rewrite

After implementing the right ISAPI Rewrite for ASP.NET applications such as the example display above, we now have a more user friendly url that will help the search engine such Google “understand” more about the linking page url of the website because it is display in “pure” words. This is important because it will bring a a positive effects to the particular web page in the sense of SEO and ranking.
So search engines are pleased with our webpage, we as webmasters are also happy to deliver what search engines “understand”, so both party wins!

You can implement the ISAPI Rewrite techniques that displayed above first by by confirming that your web host support rewrite module. To make sure with this, you can enquire with your web host proIf you are finding for a suitable ASP.NET web host that fully support ISAPI Rewrite module, you can log on to at – one of the professional ASP.NET web hosting providers with dedicated supports teams.

[email protected]