How to do subdomains with Codeigniter and Nginx? |
[eluser]tim peterson[/eluser]
I'd like to have various subdomains on my site such as this: biology.mysite.com Currently I have the following code in my nginx.conf: Code: server { This code works in that if you point the browser to biology.mysite.com, it redirects to mysite.com/tags/biology and the correct biology content loads. However, I don't want to redirect the url but want the subdomain to remain the url. So instead I replaced the above with the code below based on [this gist][1] but it has no effect (meaning pointing to biology.mysite.com simply goes to mysite.com): Code: if ($host ~* ^www\.([a-z0-9]*)\.(mysite\.com) ) Thoughts? [1]: https://gist.github.com/lynxluna/1050850 |
Welcome Guest, Not a member yet? Register Sign In |