Rewrite websocket and https to different path

hello, how can i rewrite websocket and https page to different path?
I try this:

rewrite /text {
    if {>Header} not_has Upgrade
    to /text2
}
proxy /text 127.0.0.1:10000 {
    without /text
    websocket
}

if rewrite, websocket will not work, but html page work fine.
if not rewrite the websocket will work fine, but html page not work.

Hmm, should be pretty straightforward.

Can you post your full, unredacted Caddyfile, and also post any errors you’re getting?

it’s here:

www.antecer.com {
    root /home/www
    tls 58208550912@gmail.com
    gzip
    timeouts none
    proxy / https://antecer.com {
        except /info
    }
    proxy /info 127.0.0.1:62783 {
        without /info
        websocket
    }
}
import sites/*

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.