How do I get the first letter of a variable in nginx
example
server_name ~^(?<subdomain>\w+)\.development\.test$;
location / {
root /var/www/test/$subdomain.0/$subdomain;
try_files $uri $uri/ =404;
}
So this would work
http://apple.development.test/
going to this path
/var/www/test/a/apple
I have seen methods with map but not sure how to correctly do this