cccs-web / core

CCCS' customized django web application
4 stars 11 forks source link

nginx redirect subdomain? #170

Closed cccs-ip closed 9 years ago

cccs-ip commented 9 years ago

CCCS used to host our blog at blog.crossculturalconsult.com. I liked the sub-domain here to establish the blog as a semi-autonomous element (even if it isn't). Anyway, now Google is complaining that the site doesn't exist. Can we create a forward from http://blog.crossculturalconsult.com to https://crossculturalconsult.com/blog ?

pwhipp commented 9 years ago

I've added an appropriate Nginx directive (slightly complicated so it handles http or https incoming) here but it wont work until you remove the current dns mapping for blog.crossculturalconsult.com:

(cccs)~/system $ host blog.crossculturalconsult.com
blog.crossculturalconsult.com has address 184.73.166.232
^C(cccs)~/system $ host crossculturalconsult.com
crossculturalconsult.com has address 54.83.12.43
^C(cccs)~/system $ host foo.crossculturalconsult.com
foo.crossculturalconsult.com has address 54.83.12.43

You can test the redirection that is already in place by visiting fblog.crossculturalconsult.com.

You can remove rather than change it because of the wildcard domain setting (as indicated by foo... above)

cccs-ip commented 9 years ago

thank you!