# كيف أقوم بما فعلته في htaccess في nginx؟

**URL:** <https://meta.discourse.org/t/how-do-i-do-what-i-did-in-htaccess-in-nginx/80772>\
**Category:** Self-hosting\
**Created:** [16 فبراير 2018، 7:55م UTC](https://meta.discourse.org/t/how-do-i-do-what-i-did-in-htaccess-in-nginx/80772 "2018-02-16T19:55:48Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![MostHated](https://avatars.discourse-cdn.com/v4/letter/m/bbce88/32.png) [@MostHated](https://meta.discourse.org/u/MostHated)\
**Post date:** [16 فبراير 2018، 7:55م UTC](https://meta.discourse.org/t/how-do-i-do-what-i-did-in-htaccess-in-nginx/80772/1 "2018-02-16T19:55:49Z")

</div>

Hey there,  
I just switched over to Discourse, I was testing Flarum before with Apache and htaccess and I had a rule written up that whenever there was a subdomain (excluding www.) it would take that subdomain and append it to the end of the url to simulate a dynamic subdomains and I didn’t have to actually make them for them to work how I wanted. Example being if you type “[abc.domain.com](http://abc.domain.com)” it would end up as “[domain.com/forum/t/abc](http://domain.com/forum/t/abc)” which would drop you in the abc section of the forum. Is it possible to do this with Discourse using nginx?

Looking at how Discourse is laid out, I would want it to be [abc.domain.com](http://abc.domain.com) takes you to [domain.com/forum/c/abc/](http://domain.com/forum/c/abc/) If anyone has any insight on this, I would appreciate it!

Thanks,

---

_[View the full topic](https://meta.discourse.org/t/how-do-i-do-what-i-did-in-htaccess-in-nginx/80772)._
