I'm using ISAPI Rewrite 3 under ASP.NET / IIS 7.
My .htaccess
file is pretty short:
RewriteEngine On
RewriteProxy ^(forum|events|support|_css|css|_js)(.*) http://othersite/$1$2
Requests like http://mysite/events/page1.aspx
, or http://mysite.com/css/site.css
, everything works great. However, requests for images http://mysite/images/smurf.gif
are apparently not processed by ISAPI Rewrite, and I receive a 404 error.
The error page also references a weird url. For instance, if I request /images/smurf.png
, the error page will show /images/smurf.png.rwhp
. I think .rwhp
stands for "RewriteHelper", and seems to be coming from ISAPI Rewrite itself. This suggests that the handler is processing the request, but is doing something very strange with it.
How can I get around this? Why is this only happening for images?