首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >IIS 10中典型的ASP URL重写

问IIS 10中典型的ASP URL重写
EN

Stack Overflow用户
提问于 2017-02-22 14:33:04
回答 1查看 976关注 0票数 0

我想要IIS10中的RewriteURL经典ASP

-> domain.com/login.asp

还有一种使用RewriteRule的方法。

我对此不太确定。

请帮帮我..。

这是我的web.config文件设置..。

谢谢。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-02-23 14:16:15

修改你的原始web.config --试试这个。如果您对服务器具有RDP访问权限,还可以在IIS管理器中使用URL重写工具--这将为您写入web.config。

代码语言:javascript
复制
<configuration>
    <system.webServer>
        <httpErrors errorMode="Detailed" />
        <defaultDocument enabled="true">
            <files>
                <add value="default.asp" />
                <add value="index.asp" />
                <add value="login.asp" />
           </files>
        </defaultDocument>
        <rewrite>
           <rules>
              <rule name="Login" stopProcessing="true">
                 <match url="^login$"/>
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
                    </conditions>
                    <action type="Rewrite" url="login.asp"/>
                </rule>   
           </rules>
        </rewrite>
    </system.webServer>
</configuration>
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42394383

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档