全球主机交流论坛
标题:
这个网址nginx要怎么替换?
[打印本页]
作者:
哈P哥
时间:
2012-9-18 20:18
标题:
这个网址nginx要怎么替换?
本帖最后由 哈P哥 于 2012-9-18 21:24 编辑
比如这个 http://www.xxx.com/read.php?tid=801922&fpage=0&toread=&page=1 就访问不了,求替换成
http://www.xxx.com/htm_data/7/1209/801922.html 的subs_filter的替换方法
反代就是替换不了。求替换方法。
(, 下载次数: 0)
上传
点击文件名下载附件
就是图片里《 这个我点一下就返回原网址了,点其他的12345都正常的
我加了以下这些都不行哇。。。
server
{
listen 443;
server_name www.自己的.com;
index index.html index.htm index.php;
ssl on;
ssl_certificate server.crt;
ssl_certificate_key server.key;
location /
{
proxy_redirect off;
subs_filter 'www.目标.com' 'www.自己的.com' gi;
subs_filter '<(iframe.*?)>[\s\S]*?<(\/iframe.*?)>' '' gi;
subs_filter '<(script.*?)>[\s\S]*?<(\/script.*?)>' '' gi;
subs_filter '<(noscript.*?)>[\s\S]*?<(\/noscript.*?)>' '' gi;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Referer http://www.目标.com;
proxy_set_header Host www.目标.com;
proxy_set_header X-Forwarded-Proto https;
proxy_pass http://www.目标.com;
proxy_set_header Accept-Encoding "";
}
access_log off;
}
作者:
誓誓
时间:
2012-9-18 20:21
等技术帝回来
作者:
lazyzhu
时间:
2012-9-18 20:22
代码呢
作者:
哈P哥
时间:
2012-9-18 20:29
求替换方法
作者:
Kvm
时间:
2012-9-18 20:30
不会
作者:
ccc
时间:
2012-9-18 20:41
帮顶了啊
作者:
哈P哥
时间:
2012-9-18 20:51
都睡觉了吗?
作者:
qiyun
时间:
2012-9-18 20:53
坐等技术帝
作者:
lazyzhu
时间:
2012-9-18 20:55
提示下
链接可以用rewrite,内容才用subs_filter
作者:
哈P哥
时间:
2012-9-18 20:59
lazyzhu 发表于 2012-9-18 20:55
提示下
链接可以用rewrite,内容才用subs_filter
不过我地下还有段就是强制转跳的啊,难道也要加到地下那一段?
强制转跳用什么格式的字符?
server
{
listen 80;
server_name www.自己的.com;
rewrite ^(.*) https://www.自己的.com$1 permanent;
}
作者:
哈P哥
时间:
2012-9-18 21:24
比如这个 http://www.xxx.com/read.php?tid=801922&fpage=0&toread=&page=1 就访问不了,求替换成
http://www.xxx.com/htm_data/7/1209/801922.html 的subs_filter的替换方法
欢迎光临 全球主机交流论坛 (https://loc.516000.xyz/)
Powered by Discuz! X3.4