Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache 将htaccess RewriteCond转换为web.config_Apache_.htaccess_Iis_Web Config - Fatal编程技术网

Apache 将htaccess RewriteCond转换为web.config

Apache 将htaccess RewriteCond转换为web.config,apache,.htaccess,iis,web-config,Apache,.htaccess,Iis,Web Config,这段代码从htaccess到web.config的转换/翻译是什么 Options +SymLinksIfOwnerMatch RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . / [L] 好吧,我想我找到了答案: <rule name="Remove trailing slash" stopProc

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

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

好吧,我想我找到了答案:

    <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>

如果您的问题得到解决,请您将有用的建议标记为答案。这将帮助其他面临同样问题的人。如果您的问题仍然存在,请尝试参考社区成员提供的解决方案。如果您还有其他问题,请告诉我们。我们将努力提供进一步的建议来解决这个问题。谢谢你的理解。