# Nginx configuration needed to dynamically rewrite a subdirectory to a subdomain

**URL:** <https://www.ruby-forum.com/t/nginx-configuration-needed-to-dynamically-rewrite-a-subdirectory-to-a-subdomain/238569>\
**Category:** NGINX\
**Created:** [January 17, 2014, 6:07am UTC](https://www.ruby-forum.com/t/nginx-configuration-needed-to-dynamically-rewrite-a-subdirectory-to-a-subdomain/238569 "2014-01-17T06:07:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![musicdenotation](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/ea666f/32.png) [@musicdenotation](https://www.ruby-forum.com/u/musicdenotation)\
**Post date:** [January 17, 2014, 6:07am UTC](https://www.ruby-forum.com/t/nginx-configuration-needed-to-dynamically-rewrite-a-subdirectory-to-a-subdomain/238569/1 "2014-01-17T06:07:21Z")

</div>

How to configure NGINX daemon so that [blog.xxx.com](http://blog.xxx.com) becomes [XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/blog)

Can anyone help me?

Posted at Nginx Forum:

> **[Nginx configuration needed to dynamically rewrite a subdirectory to a subdomain](https://forum.nginx.org/read.php?2,246545,246545#msg-246545)**
>
> How to configure NGINX daemon so that blog.xxx.com becomes xxx.com/blog Can anyone help me?

---

<div class="post-metadata">

**Author:** ![jamesandrewyoung](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/f08c70/32.png) [@jamesandrewyoung](https://www.ruby-forum.com/u/jamesandrewyoung)\
**Post date:** [January 17, 2014, 2:58pm UTC](https://www.ruby-forum.com/t/nginx-configuration-needed-to-dynamically-rewrite-a-subdirectory-to-a-subdomain/238569/2 "2014-01-17T14:58:02Z")

</div>

On 17-01-14 06:06, jamesandrewyoung wrote:

> How to configure NGINX daemon so that [blog.xxx.com](http://blog.xxx.com) becomes [XXX Sex - Free Porn Videos at XXX.com](http://xxx.com/blog)
> 
> Can anyone help me?

> **[LMGTFY - Let Me Google That For You](https://lmgtfy.app/?q=nginx%2Brewrite)**
>
> For all those people who find it more convenient to bother you with their question rather than to Google it for themselves.

Regards,  
Patrick
