URL Rewrites

URL Rewrites

URL Rewrites

  • URL redirecting and URL rewriting are distinct
  • Rewrite is a server-side operation
  • The request is rewritten on the server side, and then the result of the rewrite is served
    • The browser is not notified that a rewrite has occurred on the server side
  • The URL in the browser still reflects what the browser originally requested
    • The browser is not aware that a substitution has occurred on the server side
  • A set of web server rules can include both RewriteRule directives and RedirectRule directives

The URL Rewrite 2.0 Tool

  • An add-on module that extends the functionality of IIS
  • Used to create rules to generate URLs
    • To make them easier for users to remember
    • To make them simpler for search engines to index
    • To create URLs that implement a consistent and canonical host name format
  • Rewriting URLs is done for a number of purposes
    • Perform redirects
    • Send custom responses
    • Stop HTTP requests based on rules
  • Rules for rewriting URLs can be based on a number of factors
    • HTTP headers
    • HTTP response or request headers
    • IIS server variables
    • Programming logic

Sources