网站隐藏跳转代码php,域名跳转代码[可隐藏与不隐藏域名转向代码(自动跳转代码) ]...

许多域名都绑在上面,而且也就一个虚拟目录的话就可以这么做。我开始买服务器的时候那IDC商说可以绑12个域名,而且说的和租,就以为那多分几个目录没什么关系。 但是结果我注册交钱了却12个域名只能指向同一个目录,无奈就只有想出这个鬼方法。 使用方法很简单, 比如第一句,的意思就是用户输入的是hi1000y.cn,那么就自动跳转到http://hi.baidu.com/netfate ,面的意思都是样的。 SERVER_NAME是输入的,response.redirect是要跳转到那去的,在根目录下多建几个文件夹,把不同的程序放到不同的目录。在index做出判断,然后根据用户输入的域名在跳转到相应的目录,这样就搞定了。不过在写程序的时候,比如image等等,要把路径写全。

方法一:asp

if Request.ServerVariables("SERVER_NAME")="hi1000y.cn" then

response.redirect "http://hi.baidu.com/netfate"

elseif Request.ServerVariables("SERVER_NAME")="www.hi1000y.cn" then

response.redirect "http://hi.baidu.com/netfate"

elseif Request.ServerVariables("SERVER_NAME")="www.baidu12.com" then

response.redirect "http://hi.baidu.com/netfate"

elseif Request.ServerVariables("SERVER_NAME")="baidu12.com" then

response.redirect "http://hi.baidu.com/netfate"

elseif Request.ServerVariables("SERVER_NAME")="www.baidu12.com" then

response.redirect "http://hi.baidu.com/netfate"

elseif Request.ServerVariables("SERVER_NAME")="baidu12.com" then

response.redirect "http://hi.baidu.com/netfate"

elseif Request.ServerVariables("SERVER_NAME")="baidu12.com" then

response.redirect "http://218.61.50.2:60004/"

elseif Request.ServerVariables("SERVER_NAME")="www.baidu12.com" then

response.redirect "http://218.61.50.2:60004/"

elseif Request.ServerVariables("SERVER_NAME")="baidu12.com" then

response.redirect "http://61.176.204.208:60005/"

elseif Request.ServerVariables("SERVER_NAME")="www.baidu12.com" then

response.redirect "http://61.176.204.208:60005/"

else

response.redirect "http://61.176.204.208:60005/"

end if

%>

asp版的还有人这么写:

response.redirect http://www.baidu12.com/bb0552/

else%>

response.redirec

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值