djangoproject.com
djangoproject.com copied to clipboard
Fix non-docs pages accessible on docs subdomain
Summary
- Redirect
/foundation/and/community/paths ondocs.djangoproject.comtowww.djangoproject.com - Uses 301 permanent redirects to preserve SEO
- Preserves the full path and query string in redirects
Problem
Non-documentation pages (like /foundation/ and /community/) were incorrectly accessible on docs.djangoproject.com when they should only exist on www.djangoproject.com.
Fixes #878
Test plan
- [x] Added tests for
/foundation/redirect - [x] Added tests for
/community/redirect - [x] Added test for query string preservation
- [x] All existing tests pass