We recently upgraded from IIS 5.0 and windows 2000 to IIS 7 and windows 2008. For handling url rewrites, we use Helicon Isapi Rewrite 3.
With the new configuration, our rewrite rules are failing because IIS is appending a :80 to our links.
For instance, on the old site. /media/hr/pdf/application.pdf would redirect to our 开发者_高级运维static server just fine.On the new site, /media/hr/pdf/application.pdf generates a 404 saying that :80/media/hr/pdf/application.pdf could not be found.
here is the rule. RewriteRule (^|^/)(media/.*) http://static.mysite.com/global/images/$2 [NC,L,O]
Does anyone know a way to stop the :80 from being added?
thanks in advance.
I don't know, but....
you can use the built-in IIS7 rewriting module from Microsoft. It's free. It's more commonly used that Helicon's. There's a capability for slurping in rules that are compatible with Apache mod_rewrite, which I think is the same as the syntax for Helicon. Consider it. Find it at http://iis.net
Also - there's a free, open source rewriter that works with IIS7, called IIRF. It won't add :80 to your URLs. Find it at http://iirf.codeplex.com
精彩评论