基本信息
源码名称:Discuz 登陆后跳转至二级域名(or不同域名)页面 示例源码
源码大小:0.56KB
文件格式:.html
开发语言:js
更新时间:2013-10-29
友情提示:(无需注册或充值,赞助后即可获取资源下载链接)
嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300
本次赞助数额为: 2 元×
微信扫码支付:2 元
×
请留下您的邮箱,我们将在2小时内将文件发到您的邮箱
源码介绍
二级域名下的服务器端执行的代码如下:
if(IsLogin==false){ string url = "http://www.discuzsite.com/member.php?mod=logging&action=login&referer=vip.html?" Request.Url.AbsoluteUri.ToLower().Replace("http://该程序当前的域名",""); //最终url应该是这个样子: http://www.discuzsite.com/member.php?mod=logging&action=login&referer=vip.html?/相对文件路径(如aa/bb.html) Response.Redirect(url); }
以下页面放到这个网址 www.discuzsite.com/vip.html对应的位置
<html> <head><title>跳转至VIP页面</title> <script type="text/javascript"> var toUrl='http://vip.yingxiaobu.com'; if(location.href.indexOf("?")!=-1){ var strs=location.href.split('?'); toUrl='http://vip.yingxiaobu.com' '' strs[1]; } location.href=toUrl; </script> </head> <body style="text-align:center;margin-top:30px;"> <a href="http://vip.yingxiaobu.com"><img style="border:0px;" src="http://www.yingxiaobu.com/static/image/common/logo.png" /></a> <h2><a href="http://vip.yingxiaobu.com">如果网页没有自动跳转,请点击此处跳转至VIP页面</a></h2></body> </html>