Rewrite for new Woltlab Suite

I’m trying to convert the new nginx rewrite config to caddy for the recent wotlab suite without success:

nginx config:
location / {
index index.php;

try_files $uri $uri/ @rewrite;
   }
   location @rewrite {
rewrite ^/(forum/|cms/|wcf/|calendar/|filebase/|blog/|gallery/)?([^.]+)$ /$1index.php?$2 last;
}

my caddy try:

rewrite / {
r ^/(forum/|cms/|wcf/|calendar/|filebase/|blog/|gallery/)?([^.]+)$
to /{1}index.php{2}
}

doesn’t work as it redirects all links to /

This would be expected behaviour if requests to index.php are being handled by the static fileserver.

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