【问题标题】:I need someone to convert web.config to .htaccess我需要有人将 web.config 转换为 .htaccess
【发布时间】:2017-03-30 11:34:19
【问题描述】:

您好,任何人都可以将 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>

【问题讨论】:

  • “我需要有人来做这件事”,这就是顾问的职责 ;-)
  • 也许你应该花钱请人去做。

标签: .htaccess web-config code-conversion


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

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-05
    • 1970-01-01
    相关资源
    最近更新 更多