Nginx wildcard subdomain redirection
In a situation like where you are using nginx and you have to redirect abc.example.com, or random.example.com to example.com/user/subdomain, here is the snippet that will do the job. Lets say your nginx server block looks like this: server { listen 80; server_name example.com www.example.com; root /var/www/example.com/htdocs; index index.php index.html index.htm; […] } Now add this … Continue reading Nginx wildcard subdomain redirection