【问题标题】:Convert htaccess RewriteCond to web.config将 htaccess RewriteCond 转换为 web.config
【发布时间】:2020-09-09 06:51:19
【问题描述】:

这段代码从 htaccess 到 web.config 的转换/翻译是什么?

Options +SymLinksIfOwnerMatch 
RewriteEngine On 
RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . / [L]

【问题讨论】:

    标签: apache .htaccess iis web-config


    【解决方案1】:

    好的,我想找到答案了:

        <rule name="Remove trailing slash" stopProcessing="true">
            <match url=".*" />
            <conditions logicalGrouping="MatchAll">
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
            </conditions>
            <action type="Rewrite" url="index.html" />
        </rule>
    

    【讨论】:

    • 如果您的问题得到解决,我请求您将有用的建议标记为答案。这将帮助面临同样问题的其他人。如果您的问题仍然存在,请尝试参考社区成员提供的解决方案。如果您还有其他问题,请告诉我们。我们将尝试提供进一步的建议来解决该问题。感谢您的理解。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-01-05
    • 1970-01-01
    • 1970-01-01
    • 2012-01-30
    相关资源
    最近更新 更多