Nginx笔记总结十三:sub_filter内容替换
2024-08-28 23:31:27
Nginx变异安装加上参数 --with-http_sub_module
配置文件:
location ~* ^/portalproxy/([-]*)/portal(.*)$ {
#sub_filter '302 Found' 'success';
#sub_filter_once off;
set $bodyContent '<html><head><title>success</title></head><body><script>location.href="http://$host/portalproxy/portal?url_timetemp
=$$";</script></body></html>';
#rewrite '^/portalproxy/([0-9]*)/portal$' http://$host/portalproxy/portal?url_timetemp=$1 break;
add_header Content-Type "text/html";
return $bodyContent;
}
最新文章
- SharePoint Conference 2014 Keynote
- [No00006F]总结C#获取当前路径的各种方法
- Web API 使用上安全吗?
- Angularjs,WebAPI 搭建一个简易权限管理系统 —— WebAPI项目主体结构(四)
- PHP 练习租房
- [再寄小读者之数学篇](2014-11-24 Abel 定理)
- Routes
- 跨站脚本攻击(XSS)
- postgresql赋予/撤消 用户权限
- Android SDK 5.0 这个语句带来折腾 - 生命在于折腾!
- Android手机图片适配问题
- Thinkphp3.2.3框架下封装公共的函数,例如封装CURL函数来获取接口数据
- junit设计模式--命令者模式
- Django 内置分页器
- IntentService用法
- C# 8.0的新的using语法——Using declarations
- Net Web Api Route
- Ubuntu12.04添加环境变量
- Django网站搭建(相关命令-Win10环境)
- python: 基本的日期与时间转换