I'm trying to do the following:
There is a site where you can find a user in the format http://localhost/username . I tried to make a rule that if there is no file on the server, then it will redirect to index.php?username=username. But the problem is that it redirects everything, even js and css. I want to do it like this, if the file was on the server, then it would access it, and if not, then it would make a request
index.php?username=username
There is this piece of code:
rewrite ^/(.+)$ /index.php?type=userinfo&username=$1 last;