# Using alias with variables

**URL:** <https://www.ruby-forum.com/t/using-alias-with-variables/216500>\
**Category:** NGINX\
**Created:** [February 6, 2012, 5:59pm UTC](https://www.ruby-forum.com/t/using-alias-with-variables/216500 "2012-02-06T17:59:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [February 6, 2012, 5:59pm UTC](https://www.ruby-forum.com/t/using-alias-with-variables/216500/1 "2012-02-06T17:59:19Z")

</div>

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:

> **[Using alias with variables](https://forum.nginx.org/read.php?2,222048,222048#msg-222048)**
>
> 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.
