.htaccess来规则ASP .NET

时间:2013-08-08 18:59:14

标签: asp.net .net .htaccess

最近我切换到ASP服务器,我需要将这些htacces规则转换为web.config规则。有人可以帮帮我吗?

    <IfModule mod_rewrite.c>
Options -MultiViews
RewriteEngine on
RewriteCond %{HTTP_COOKIE} HTTP_IS_RETINA [NC]
RewriteCond %{REQUEST_FILENAME} !@2x

RewriteRule ^(.*)\.(gif|jpg|png)$ $1@2x.$2
# if @2x isn't available fulfill the original request
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)@2x\.(gif|jpg|png)$ $1.$2
    </IfModule>

1 个答案:

答案 0 :(得分:1)

IIS 7及更高版本中的URL重写模块提供了一个导入功能,可以极大地简化将Apache mod_rewrite规则转换为IIS URL重写规则的过程。

Importing Apache mod_rewrite Rules