http://support.microsoft.com/kb/324000
This article describes how to translate redirection and rewriting configurations from an Apache configuration file to Internet Information Services (IIS).
loadTOCNode(2, 'summary'); When you use Apache, you can redirect URLs by using the Redirect directive to point a folder or a location to a different folder on either the same Web site or a different Web site. You can also alias a folder to another location by using the Alias directive. If you use IIS, you can perform the same tasks by using the URL Redirection functionality.
To redirect a folder or file IIS:
loadTOCNode(2, 'summary'); If you use Apache, you can use the regular expression system to rewrite or redirect URLs to different folders, files, or directories. If you are using IIS, you can perform the same task by using a combination of wildcard characters and replacement variables. See the following table to determine the elements of a URL that you can substitute during a rewriting procedure.
$S | Passes the last matched element from a URL. |
If /scripts is redirected to /newscripts and the original request is for /scripts/program.exe, /program.exe is the suffix. The server automatically performs this suffix substitution. You use the $S variable only in combination with other variables. |
$P | Passes the parameters in the original URL. |
For example, if the original URL is /scripts/myscript.asp?number=1, the string "number=1" is mapped into the destination URL. |
$Q | Used like $P, but includes a leading question mark. |
For example, if the original URL is /scripts/myscript.asp?number=1, the string "?number=1" is mapped into the destination URL. |
$V | Passes the requested URL, without the server name. |
For example, if the original URL is //myserver/scripts/myscript.asp, the string "/scripts/myscript.asp" is mapped into the destination URL. |
$0 through $9 |
Passes the portion of the requested URL that matches the indicated wildcard character. |
|
! | Do not redirect. | Use this variable to prevent redirecting a subfolder or an individual file in a virtual directory that has been redirected. |
IIS supports the following wildcard characters:
You use the redirection functionality described earlier in this article to activate the rewriting. Make sure that the Redirect to box contains the source and the destination URL, separated by a semicolon (;).
For example, to redirect all the files that end with .html to the Default.html file:
To redirect the query for a script to a different script, for example, to redirect myscript.asp?number=1 to newscript.asp?number=1: