In this context I'd like to get only "user1", "user2" parts of the URLs.
site.com/user1/
site.com/user2/
site.com/user2/about
site.com/user2/contact
When I try something like this, it gets all the URL.
location ~* ^/(.*)$ {
add_header X-username $1
# configuration
}
So how can I change the regex to get only first part of the URL?