I’m trying to map clean URLs to controllers of the same name. I’d like to just use a variable so that my config file doesn’t become cluttered. I tried this:
location ^~ /$1 {
rewrite ^ /controllers/$1.php last;
}
But it doesn’t seem to be working. Any ideas?
It should be
As the documentation shows