对于没有子目录绑定的空间想开多个站的代码

[全站通告] 想快速节省您的时间并可接受付费的朋友,可扫右边二维码加博主微信-非诚勿扰!

对于没有子目录绑定的空间想开多个站的代码

将以下代码存成index.asp就行了

记得是支持ASP的空间才可用的呀!

<% if Request.ServerVariables("SERVER_NAME")=" www.a.com" then response.redirect "/default.asp" else if Request.ServerVariables("SERVER_NAME")=" www.b.com" then response.redirect "/down/index.asp" else if Request.ServerVariables("SERVER_NAME")=" www.c.com" then response.redirect "/movie/index.asp" else if Request.ServerVariables("SERVER_NAME")=" www.d.com" then response.redirect "/mtv/index.asp" else if Request.ServerVariables("SERVER_NAME")=" www.e.com" then response.redirect "/book/index.asp" else response.redirect "404.htm" end if end if end if end if end if %>
子目录和域名要按自己的情况修改呀
------------------------------------------

<% dim domain domain = Request.ServerVariables("SERVER_NAME") select case domain case " www.a.com" response.redirect "/default.asp" case " www.b.com" response.redirect "/down/index.asp" case " www.c.com" response.redirect "/movie/index.asp" case " www.d.com" response.redirect "/mtv/index.asp" case " www.e.com" response.redirect "/book/index.asp" case else response.redirect "404.htm" End Select %>

仔细看看哈。。。。。可以根据自己使用调节哈!

问题未解决?付费解决问题加Q或微信 2589053300 (即Q号又微信号)右上方扫一扫可加博主微信

所写所说,是心之所感,思之所悟,行之所得;文当无敷衍,落笔求简洁。 以所舍,求所获;有所依,方所成!

支付宝赞助
微信赞助

免责声明,若由于商用引起版权纠纷,一切责任均由使用者承担。

您必须遵守我们的协议,如您下载该资源,行为将被视为对《免责声明》全部内容的认可->联系老梁投诉资源
LaoLiang.Net部分资源来自互联网收集,仅供用于学习和交流,请勿用于商业用途。如有侵权、不妥之处,请联系站长并出示版权证明以便删除。 敬请谅解! 侵权删帖/违法举报/投稿等事物联系邮箱:service@laoliang.net
意在交流学习,欢迎赞赏评论,如有谬误,请联系指正;转载请注明出处: » 对于没有子目录绑定的空间想开多个站的代码

发表回复

本站承接,网站推广(SEM,SEO);软件安装与调试;服务器或网络推荐及配置;APP开发与维护;网站开发修改及维护; 各财务软件安装调试及注册服务(金蝶,用友,管家婆,速达,星宇等);同时也有客户管理系统,人力资源,超市POS,医药管理等;

立即查看 了解详情