Help converting Woltlab .htaccess over to Caddy

I need help converting this .htaccess file over to Caddy

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1 [L,QSA]

Nginx Version

index index.php;
try_files $uri $uri/ /index.php?$uri&$args;

Look for examples repo

example.com {
    root ./public
    fastcgi / 127.0.0.1:9000 php
    rewrite {
        to {path} {path}/ /index.php?{query}
    }
}

is that can help you?

2 Likes

This is the direct translation of the nginx rewrite

rewrite {
  {path} {path}/ /index.php?{uri} # or {uri_escaped} if required
}
2 Likes

tried it on wotlab 4.x and new 5.0 beta
result:
all links are redirecting to /

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