Support #10180
domain mapping request - Kelle Cruz
Description
Please map Commons site: https://cunyastro.commons.gc.cuny.edu/ to: cunyastro.org.
Kelle is ready to make changes on her side.
History
#1
Updated by Boone Gorges 6 months ago
- Assignee set to Matt Gold
- Target version set to Not tracked
Matt, let me know when IT has made the change.
It looks like the DNS changes have not been made to cunyastro.org. Since the domain doesn't point to an existing site, I'd suggest that the DNS change be made right away, so that when we've made the changes on the Commons, we'll be able to switch over right away.
#2
Updated by scott voth 6 months ago
Kelle says she has made the changes.
#4
Updated by scott voth 6 months ago
There will be one for CGEP - but I don't think Fred Meyer has created a site on the Commons yet. I don't know of any others.
#7
Updated by Boone Gorges 6 months ago
- Status changed from New to Resolved
Thanks, all. Domain mapping is complete.
CCing Ray as an FYI: The mapping broke the custom header. The header image, as set in the Customizer, has the URL https://cunyastro.commons. get_header_image() runs through set_url_scheme(), which on the front-end means that the URL was rewritten as http://cunyastro.commons, and the browser (my browser, at least) wasn't doing the necessary redirect. As a temporary workaround, I've changed the theme mod so that the custom header URL has the mapped domain:
wp --url=cunyastro.commons.gc.cuny.edu theme mod set header_image http://cunyastro.org/wp-content/blogs.dir/3825/files/2018/08/banner2_24.jpg
This is fragile and would break if the user changes the header image again. But the issue should go away once we've got letsencrypt HTTPS for all mapped domains, which should happen in the next month or two.
#8
Updated by Raymond Hoh 6 months ago
CCing Ray as an FYI: The mapping broke the custom header. The header image, as set in the Customizer, has the URL https://cunyastro.commons. get_header_image() runs through set_url_scheme(), which on the front-end means that the URL was rewritten as http://cunyastro.commons, and the browser (my browser, at least) wasn't doing the necessary redirect.
I wrote some code awhile back to dynamically switch out the mapped domain for the subdomain for certain theme mods such as 'theme_mod_header_image'
:
https://github.com/cuny-academic-commons/cac/commit/93abbffbc28237820783a088908fbb088b779fd0
Probably lines 303-304 need adjusting. Maybe force HTTPS?
#9
Updated by Boone Gorges 6 months ago
Thanks, Ray! Yes, I think that forcing HTTPS when swapping the mapped domain for the subsite domain is probably correct, since we force HTTPS on *.commons.gc.cuny.edu.
#10
Updated by Raymond Hoh 6 months ago
I'm now forcing HTTPS when switching out theme assets for the subdomain URL in place of the mapped domain URL.
See https://github.com/cuny-academic-commons/cac/commit/2f839890539e6a01db584587219270e5eba5009d
#11
Updated by Boone Gorges 6 months ago
- Target version changed from Not tracked to 1.13.8
Looks good to me - thanks!