| 
                                       URL转发功能是域名注册后的增值服务。所谓URL转发,是通过服务器的特殊设置,将访问您当前域名的用户引导到您指定的另一个网络地址。例如,URL转发可以让用户在访问http://www.abc.com时,自动转向访问http://www.otherdomain.com/somedir/other.htm  
                                      但通过URL转发访问网站不是一种非常理想的网站访问方法,由于URL转发服务器受攻击的概率较高,影响URL的正常转发。 
                                      为了避免这种情况,我们可以通过另外一种方法实现URL的功能, 例如我们希望键入 www.help.com 能直接访问到 http://www.worldidc.com/help/index.htm, 
                    那么 
                    首先在 www.worldidc.com 的网站上绑定 www.help.com : 
                    然后在 www.worldidc.com 网站的默认首页(例:default.asp或者index.htm)中加入以下代码: 
                                      <% 
                                      dim url 
                    url=request.ServerVariables("HTTP_HOST") 
                    if url="www.help.com" then 
                    response.Redirect("http://www.worldidc.com/help/index.htm") 
                    end if 
                                      %> 
                                       
                    如果要实现隐藏转发,可以使用框架实现,代码如下: 
                                      <% 
                                      dim url,redirectUrl 
                    url=request.ServerVariables("HTTP_HOST") 
                    if url="www.help.com" then 
                    redirectUrl="http://www.worldidc.com/help/index.htm" 
                    end if 
                                      %> 
<frameset framespacing="0" border="0" rows="0,100%" frameborder="0"> 
<frame name="top" scrolling="no" noresize src="nothing.htm" marginwidth="0" marginheight="0"> 
<frame name="main" src="<%=redirectUrl%>" marginwidth="0" marginheight="0" scrolling="auto"> 
<noframes> 
<body> 
                                       <p>此网页使用了框架,但您的浏览器不支持框架。</p> 
                                       </body> 
</noframes> 
</frameset>  |