Redirect VS Rewrite - W3TECHNOLOGY

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: to 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: is a friendly URL for
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.

No comments:

Powered by Blogger.