Help converting nginx rewrite rules to caddyfile


(Teletubbies) #1

Hi,I have some trouble, please help converting nginx rewrite rules to caddyfile , thanks

location / {
            try_files $uri $uri/ /index.php$is_args$args;
        }

(Phanne) #2

You can use rewrite.

I think that might be looks like this:

rewrite {
    to /index.php{uri}
  }

(Matthew Fay) #3

Yep, but you’ll also want to try the files on disk first, though:

rewrite {
  to {path} {path}/ /index.php{uri}
}

(system) #4

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