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:
https://abc.com/feedback-announcements/60559-nexusfi-journal-challenge-may-2024-a-2.html

That breaks down to threadid 60559, page two of the thread, so it should be:
https://abc.com/showthread.php?t=60559&page=2

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

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