首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > IIS >

web.config可以设立页面跳转吗

2013-01-11 
web.config可以设置页面跳转吗?环境: windows2008+iis7.0我现在有几个页面也想在访问的时候做一下跳转,跳

web.config可以设置页面跳转吗?
环境: windows2008+iis7.0

我现在有几个页面也想在访问的时候做一下跳转,跳到首页
如:
www.xx.com/oo.html
www.xx.com/a/bb.html

访问他们的时候自动跳转到www.xx.com

需要怎么弄?
[解决办法]
IIS里面可以配置
[解决办法]
在Global里面写

使用
System.Web.HttpContext.Current.RewritePath
方法即可


[解决办法]
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <location path="index.html">
        <system.webServer>
            <httpRedirect enabled="true" destination="http://www.xxoo.com/" exactDestination="true" httpResponseStatus="Permanent" />
        </system.webServer>
    </location>
</configuration>


 <location path="index.html"> 指定文件名



or


搞个*.ashx handler里写你的过滤规则

热点排行