'7. Tips/Windows Server & IIS'에 해당되는 글 1건
- 2014.10.03 URL Rewrite
HTTP Redirect VS URL Rewrite
1. HTTP Redirect
Redirecting sends a HTTP 301 or 302 to the client,
telling the client that it should try to access the page using another URL.
The client knows that there is another URL that should be used.
2. URL Rewrite
Rewriting happens on the server, and simply is a translation of one URL to another,
that is used by your web application.
The client does not know that internally there is another URL,
it just sees the one it sent to the server.
(http://forums.iis.net/t/1174487.aspx?How+does+URL+Rewrite+differ+from+HTTP+Redirect+)
Installing ARR manually without WebPI (Web Platform Installer)
1. Stop IIS
2. Download and install the Web Farm Framework module.
2.1 Web Platform Installer
2.2 WebDeploy 2.0
2.3 http://www.iis.net/downloads/microsoft/web-farm-framework
3. Download and install the External cache
4. Download and install the URL Rewrite
http://www.iis.net/downloads/microsoft/url-rewrite
5. Download and install the Application Request Routing
http://www.iis.net/downloads/microsoft/application-request-routing
6. Restart IIS
Example
Assume that we want to forward the url ending with "/test" like http://localhost/test to http://localhost:81/.
The following example shows how to do this.
{R:2} means that the rest of url excepting 'http://host/test' address. You can check this from the test pattern.
☞ Tip
To check what the problem is when setting the URL rewrite rule, access it in the server that owns the rule. Then, the browser will give you more information. In addition, use fiddler to check the whole access URL.
References
- http://www.iis.net/learn/extensions/url-rewrite-module/modifying-http-response-headers