wifidog源码修改首页本地重定向
来源:互联网 发布:xbox one网络 编辑:程序博客网 时间:2024/06/08 04:04
wifidog首页重定向
首页重定向
修改http.c、http.h和gateway.c文件
http.h文件添加void http_callback_404_2(httpd*webserver, request *r);函数声明。
http.c 文件中添加函数:
void
http_callback_404_2(httpd *webserver,request *r)
{
chartmp_url[MAX_BUF];
s_config *config = config_get_config();
t_auth_serv *auth_server = get_auth_server();
memset(tmp_url,0, sizeof(tmp_url));
/*
* XXX Note the code below assumes that theclient's request is a plain
* http request to a standard port. At anyrate, this handler is called only
* if the internet/auth server is down so it'snot a huge loss, but still.
*/
snprintf(tmp_url,(sizeof(tmp_url)-1),"http://192.168.1.20/portal”);
/*Re-direct them to auth server */
debug(LOG_INFO,"Captured %s requesting and re-directing them to haisi page",r->clientAddr);
http_send_redirect(r, tmp_url, "");
}
然后再gateway中main_loop函数中调用
httpdAddC404Content(webserver,http_callback_404_2);
实现本地页面重定向并且远端认证服务器认证。
- wifidog源码修改首页本地重定向
- git修改仓库名次之后,本地仓库重定向问题
- 织梦首页php301重定向
- nginx根目录重定向到首页
- wifidog源码分析 - wifidog原理
- haproxy重定向修改路径
- Openstack 源码修改,实现nova boot 创建的虚拟机支持USB 重定向
- Spring MVC 中重定向 及 重定向源码跟踪
- wordpress本地搬家后重定向localhost
- xcode重定向log到本地问题
- ios NSLog内容重定向到本地
- wampserver 2.5 首页链接域名重定向问题解决方法
- 用自己的域名重定向到csdn博客首页
- wifidog 源码初分析
- wifidog 源码简要分析
- wifidog源码分析
- wifidog源码大概分析
- wifidog源码分析
- 实验吧——WriteUp&&涨姿势(4)
- 写接口Controller层
- 如何解决maven update之后JDK变回1.5
- cogs 577 蝗灾
- ADO.net 添加事务
- wifidog源码修改首页本地重定向
- Yii2框架数据库增删改查小结
- web端一个增删改查例子
- js正则 转载
- C++算法学习——预备知识(1)——泛型(通用)编程
- 浅析 JAVA虚拟机的栈与堆
- 用Tomcat服务器配置https双向认证过程实战
- 表达式
- boost