NET Summary: Examines how to perform dynamic URL rewriting with Microsoft ASP. URL rewriting is the process of intercepting an incoming Web request and automatically redirecting it to a different URL.
Discusses the various techniques for implementing URL rewriting, and examines real-world scenarios of URL rewriting.
If you are a high school teacher, please contact us for access to the ebook.
If you are a high school student, request your book companion site materials from your teacher.
For example, in the case where a website restructuring caused all of the Web pages in the /people/ directory to be moved to a /info/employees/ directory, you would want to use URL rewriting to check if a Web request was intended for a file in the /people/ directory.
If the request was for a file in the /people/ directory, you'd want to automatically redirect the request to the same file, but in the /info/employees/ directory instead.
If you are a college customer, please browse our offerings.
Scott Mitchell 4Guys From March 2004 Applies to: Microsoft® ASP.
(31 printed pages) Download the source code for this article. Or maybe you have a bunch of Web pages that were moved from one directory or website to another, resulting in broken links for visitors who have bookmarked the old URLs.
Introduction Common Uses of URL Rewriting What Happens When a Request Reaches IIS Implementing URL Rewriting Building a URL Rewriting Engine Performing Simple URL Rewriting with the URL Rewriting Engine Creating Truly "Hackable" URLs Conclusion Related Books Take a moment to look at some of the URLs on your website. In this article we'll look at using to shorten those ugly URLs to meaningful, memorable ones, by replacing Employee Info.aspx? We'll also see how URL rewriting can be used to create an intelligent 404 error.