Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Question
Thursday, March 26, 2009 10:18 AM
We have URL Rewriter installed in IIS7 on a Windows Server 2008 box.
A simple rule was created to forward all requests for a virtual directory to another server:
Using wildcards; Pattern: *webmail
Action Type: Rewrite; Rewrite URL: http://www.google.com
When posting a request to the server (http://servername/webmail), we get a 404.4 error. The Failed Request Trace shows the rule was applied and also the warning:
ModuleName="IIS Web Core", Notification="MAP_REQUEST_HANDLER", HttpStatus="404", HttpReason="Not Found", HttpSubStatus="4", ErrorCode="The filename, directory name, or volume label syntax is incorrect. (0x8007007b)"
I was expecting the initial request to be rewritten and the response to include the rewritten URL. Instead we receive the error.
What are we doing wrong?
Thanks in advance for your help.
All replies (3)
Thursday, March 26, 2009 12:52 PM
If you want to forward requests to another server then you will need to use Application Request Routing module together with URL rewriter. This blog post explains how to do that: http://blogs.iis.net/wonyoo/archive/2008/07/09/application-request-routing-arr-as-a-reverse-proxy.aspx
Thursday, March 26, 2009 5:51 PM
Installed ARR and configured it to Enable Proxy. Disabled 'Reverse rewrite host in response headers' leaving all other options as default.
Created an identical URL rewrite rule as the one in the initial post.
The 404.4 error is gone and the client browser accesses the rewrite URL. However, instead of performing a rewrite, the client is redirected, since the URL in the client browser is the target URL instead of keeping the original URL, as it should since we intend for a rewrite and not a redirection.
Any configuration issues I might be missing on ARR?
Thanks in advance.
Thursday, March 26, 2009 6:31 PM
"Reverse rewrite host in response headers" is probably what you need. If that does not work - can you collect "failed request tracing" traces on the IIS machine running url-rewriter+ARR?