我需要有人将web.config转换为.htaccess

时间:2017-03-30 11:34:20

标签: .htaccess web-config code-conversion

你好,任何人都可以将web.config转换为.htaccess吗?从下面的代码?我需要有人这样做。

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="Imported Rule 9">
                    <match url="^([^/]+)/?$" ignoreCase="false" />
                    <conditions logicalGrouping="MatchAll">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="chat.php?page={R:1}" appendQueryString="true" />
                </rule>
                <rule name="RequestBlockingRule1" patternSyntax="Wildcard" stopProcessing="true">
                    <match url="*" />
                    <conditions>
                        <add input="{HTTP_HOST}" pattern="192.95.42.181" />
                    </conditions>
                    <action type="AbortRequest" />
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

1 个答案:

答案 0 :(得分:0)

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^/]+)/?$ chat.php?page=$1
Deny From 192.95.42.181