Posted under .net & Code & Software Design
“Rewriting” means intercepting a request from the web, and responding with the document behind a different URL. If this sounds like a redirect, it should; the main difference is that we’ll be doing this internally, without the client’s knowledge. ( The “client” is Internet Explorer, FireFox, Safari, or GoogleBot. ) In other words, www.example.com/page.aspx?search=software becomes exposed to the outside world as www.example.com/page/search/software; when somebody asks for the latter, the request is internally sent to the former.
You might do this after restructuring a web site, to prevent links to moved pages from turning into dead ends. Or, you might do it to improve your standing with search engines, the way most WordPress blogs use a post’s date and title, rather than it’s ID in the database, to create “permalinks.” On Apache servers, this is accomplished with mod_rewrite in the .htaccess file, which isn’t available to IIS users.
Instead, developers running Microsoft’s web server, Internet Information Services, or IIS, have three options for rewriting. Let’s examine these, in reverse order by difficulty and cleverness. Continue Reading »