Using alias with variables

Hello everybody,
I need to use the alias setting from a request made to /test/str1_str2/,
so path become /var/www/data/str1_cache_str2/.
I don’t understand how to extract str1, str2 and convert to
str1_cache_str2.

Thank you very much
L.

Posted at Nginx Forum: