Losing my mind, please help

caddy v2.7.6 on debian 12

I have an old vbulletin forum that used vbseo. I want to stop the “seo friendly” urls and revert back to normal urls.

Example old URL:

That breaks down to threadid 60559, page two of the thread, so it should be:

But I am just getting redirect loops and errors. Disabled cloudflare cache, using incognito, etc.

Here are old nginx rules I am trying to convert to caddy 2:

location ~ "^/[^/]+/[^/]+/(\d+)[^-]*-new-post\.html$" {
        return 302 /showthread.php?t=$1&goto=newpost;

    location ~ "^/[^/]+/[^/]+/(\d+)-[^/]*-(\d+)\.html$" {
        return 302 /showthread.php?t=$1&page=$2;

    location ~ "^/[^/]+/[^/]+/(\d+)-[^/]+\.html$" {
        return 302 /showthread.php?t=$1;

    location ~ "^/[^/]+/[^/]+/[^/]+-post(\d+)\.html$" {
        return 302 /showthread.php?p=$1;

I want to use a (block) { } in caddy that I can import.

I am losing my mind. What am I missing here?

Please fill out the help topic template as per the forum rules.

Show your current config, logs, version, how you installed Caddy, etc.

1 Like