URL Parts available to URL Rewrite Rules

Posted by The Official Microsoft IIS Site on ASP.net Weblogs See other posts from ASP.net Weblogs or by The Official Microsoft IIS Site
Published on Tue, 20 Apr 2010 13:49:27 GMT Indexed on 2010/04/20 15:43 UTC
Read the original article Hit count: 847

Filed under:
|
|
|
|
URL Rewrite is a powerful URL rewriting tool available for IIS7 and newer.  Your rewriting options are almost unlimited, giving you the ability to optimize URLs for search engine optimization (SEO), support multiple domain names on a single site Read More......( read more ) Read More......(read more)

© ASP.net Weblogs or respective owner

URL Parts available to URL Rewrite Rules

Posted by OWScott on ASP.net Weblogs See other posts from ASP.net Weblogs or by OWScott
Published on Tue, 20 Apr 2010 13:49:27 GMT Indexed on 2010/04/20 13:54 UTC
Read the original article Hit count: 847

Filed under:
|
|
|
|

URL Rewrite is a powerful URL rewriting tool available for IIS7 and newer.  Your rewriting options are almost unlimited, giving you the ability to optimize URLs for search engine optimization (SEO), support multiple domain names on a single site, hiding complex paths and much more.

URL Rewrite allows you to use any Server Variable as conditions, and with URL Rewrite 2.0, you can also update them on the fly.  To see all variables available to your site, see this post.

An understanding of the parts of a complete URL are essential to working with URL Rewrite, so I’ll include the basics here.  Ruslan Yakushev’s configuration reference was my authoritative source for this.

Take this URL for example:

image

The URL is http://www.bing.com/search?q=IIS+url+rewrite

The parts of the URL are: http(s)://<host>:<port>/<path>?<querystring>

Part Example Server Variable
http(s) http SERVER_PORT_SECURE or HTTPS = on/off
<host> www.bing.com HTTP_HOST
<port> Default is 80 SERVER_PORT
<path> search The rule pattern in URL Rewrite
<path> /search PATH_INFO
<querystring> q=IIS+url+rewrite QUERY_STRING
entire URL path with querystring /search?q=IIS+url+rewrite REQUEST_URI

It’s important to note that /, : and ? aren’t included in some of the server variables. Understanding which slashes are included is important to creating successful rules.

© ASP.net Weblogs or respective owner

URL Parts available to URL Rewrite Rules

Posted on Dot net Slackers See other posts from Dot net Slackers
Published on Tue, 20 Apr 2010 00:00:00 GMT Indexed on 2010/04/20 14:43 UTC
Read the original article Hit count: 847

Filed under:
URL Rewrite is a powerful URL rewriting tool available for IIS7 and newer.  Your rewriting options are almost unlimited, giving you the ability to optimize URLs for search engine optimization (SEO), support multiple domain names on a single site, hiding complex paths and much more. URL Rewrite allows you to use any Server Variable as conditions, and with URL Rewrite 2.0, you can also update them on the fly.  To see all variables available to your site, see this post. An understanding...

Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.



Email this Article

© Dot net Slackers or respective owner

Related posts about iis7

Related posts about iis