Header Ads

Redirect VS Rewrite


Changes URL in browser address barDoesn’t change URL in browser address bar
Useful for search engine optimization by causing the search engine to update the URL.Also useful for search engines by using a friendly URL to hide a messy URL.
Supports the following redirects:
301 – Permanent
302 – Found
303 – See Other
307 - Temporary
Redirect status is non-applicable
Can redirect to the same site or an unrelated site.
Example: http://w3technology.info to http://www.w3technology.info in the browser
Generally rewrites to the same site using a relative path, although if you have the ARR module installed you can rewrite to a different site. When you rewrite to a different site, URL Rewrite functions as a reverse proxy.
Example: http://localtest.me/articles/how-to-win-at-blog is a friendly URL for http://localtest.me/articles.aspx?name=how-to-win-at-blog
The page request flow is:
• Browser requests a page
• Server responds with a redirect status code
• Browser makes 2nd request to the new URL
• Server responds to the new URL
The page request flow is:
• Browser requests a page
• URL Rewrite rewrites the URL and makes request (still within IIS) for the updated page
Fiddler is a great tool to see the back and forth between the browser and server.Tools like Process Monitor and native IIS tools are best for getting under the covers.

1 comment:

  1. Hi, I read your new stuff regularly. Your humoristic
    style is awesome, keep it up!


Powered by Blogger.