我的配置是这样的,但是只能反代首页,点击其他链接就会恢复网址哈~
同时测试了几个其他网址,没问题哈
感谢

|      1jsjcjsjc OP 就这个网址 www.websiteplanet.com | 
|  |      2zggsong      2022-09-25 09:26:09 +08:00 去研究一下这个 https://reflare.js.org/ | 
|      3o00o      2022-09-25 09:45:51 +08:00 求盗于路? | 
|  |      4xilou31      2022-09-25 11:16:04 +08:00 没用过宝塔,但是你这个像是只反代了 url ,没有反代网址后的 uri | 
|  |      5placeholder      2022-09-25 13:16:34 +08:00 不是,网页里用 a 标签写死的 href 也能反代吗? | 
|      6lcy630409      2022-09-25 14:02:48 +08:00 点那个高级功能,“代理目录”填 / | 
|  |      8treblex      2022-09-25 19:11:04 +08:00 因为他 a 标签都是写的完整路径,包含了域名的 用 php curl 之后替换部分内容输出似乎是可以的 | 
|  |      10Ch3n4y      2022-09-25 21:09:53 +08:00 发送域名改为$host 试试 | 
|      11jsjcjsjc OP 搞定 ``` location / { proxy_ssl_name www.websiteplanet.com; proxy_ssl_server_name on; gzip on; gzip_min_length 1k; gzip_buffers 4 16k; gzip_comp_level 5; gzip_types text/plain application/javascript application/x-javascript text/css application/xml text/javascript application/x-httpd-php image/jpeg image/gif image/png; gzip_vary off; proxy_redirect off; proxy_set_header Host www.websiteplanet.com; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass https://www.websiteplanet.com; proxy_set_header Accept-Encoding ""; sub_filter 'websiteplanet.com' 'websiteplanet.org'; sub_filter_types text/xml; sub_filter_once off; } ``` |