我得到404而不是403.4 [英] i am getting 404 instead of 403.4

查看:89
本文介绍了我得到404而不是403.4的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试将http://重定向到https://

使用此代码

I am trying to redirect http:// to https://

with this code

<rewrite>
            <rewritemaps>
                <rewritemap name="httptohttps" />
            </rewritemaps>
            <rules>
                <rule name="http to https" stopprocessing="true">
                    <match url="(.*)" />
                    <conditions>
                        <add input="{HTTPS}" pattern="^OFF$" />
                    </conditions>
                    <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirecttype="Found" />
                </rule>
            </rules>
        </rewrite>



但不是403.4;我得到404(找不到页面);
帮助我



but instead of 403.4; i am getting 404(Page not found);
help me out

推荐答案

" / > < /conditions > < 动作 =" 重定向" url https://{HTTP_HOST} {REQUEST_URI}" 重定向类型 =" / > < /rule > < /规则 > < /rewrite >
" /> </conditions> <action type="Redirect" url="https://{HTTP_HOST}{REQUEST_URI}" redirecttype="Found" /> </rule> </rules> </rewrite>



但不是403.4;我得到404(找不到页面);
帮我解决



but instead of 403.4; i am getting 404(Page not found);
help me out


看一看场景1 ...

http://support.microsoft.com/kb/975341 [
have a look on scenario 1...

http://support.microsoft.com/kb/975341[^]


这篇关于我得到404而不是403.4的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆