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 {
    without /text

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: {
    root /home/www
    timeouts none
    proxy / {
        except /info
    proxy /info {
        without /info
import sites/*

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