I am having a problem with the URL rewrite module. I have a subdomain with it's own set of rewrite rules and I am getting 404 errors whenever I click on Urls that have been reformatted. My setup is below.
On the main site I am using the following inbound rule to rewrite requests from {http}://mydomain.com/subdomain to {http}://subdomain.mydomain.com.
This resolves fine and works fine. All direct links to other pages on the subdomain render fine. For example {http}://subdomain.mydomain.com/Page1.aspx works.
Now, in my subdomain I an using an outbound rule to change the rewritten URLs to remove the subdomain folder from the link.
This also works as expected. All links on the pages are rewrittne to remove the subdomain. Links that are written as {http}://subdomain.mydomain.com/subdomain/Page1.apsx are properly changed to {http}://subdomain.mydomain.com/Page1.aspx. These pages will render properly when the link is clicked.
So, this brings me to the problem. I have additional rewrite rules for the subdomain to resolve product pages from product.aspx?pid=123&uid=1 to /products/123/1. Here is one of those rules.
So after the outbound rewrite rule I am left with a url on Page1.aspx that looks like {http}://subdomain.domain.com/products/123/1. This is exactly what I want. The problem is when I click on the link it gives a 404 error with the following details.
-- HTTP Error 404.0 - Not Found The resource you are looking for has been removed, had its name changed, or is temporarily unavailable.
Requested URL: {http}://subdomain.mydomain.com/subdomain/products/123/1
The error leads me to belive that the clicked url was not passed back into the url rewriter and resolved properly. I have FRT turned on but am not getting anything logged when this happens. Can anyone tell me why I am seeing a 404 error and not my products page?