Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirect maas.ubuntu.com/docs* to docs.ubuntu.com #35

Closed
nottrobin opened this issue Feb 8, 2017 · 2 comments
Closed

Redirect maas.ubuntu.com/docs* to docs.ubuntu.com #35

nottrobin opened this issue Feb 8, 2017 · 2 comments
Assignees

Comments

@nottrobin
Copy link
Contributor

nottrobin commented Feb 8, 2017

The MAAS 1.9 documentation is preserved on docs.ubuntu.com and the API docs are soon to be.

Once #34 is live, it is my plan to redirect all top level sets of documentation to their new home, and also setup specific redirects for pages which have somewhat sensible new homes:

RewriteEngine on

RewriteRule ^/docs/(.*) /docs2.1/$1 [R=301]
RewriteRule ^/docs(2.1|2.0)/releases.html https://launchpad.net/maas/+series [R=301]
RewriteRule ^/docs2.1/changelog.html https://docs.ubuntu.com/maas/2.1/en/2.1-release-notes [R=301]
RewriteRule ^/docs2.0/changelog.html https://docs.ubuntu.com/maas/2.0/en/ref-release-notes [R=301]
RewriteRule ^/docs(2.1|2.0)/https://docs.ubuntu.com/maas/2.0/en/ref-release-notes [R=301]
RewriteRule ^/docs(2.1|2.0)/api.html https://docs.ubuntu.com/maas/$1/en/api [R=301]
RewriteRule ^/docs(2.1|2.0)/api_authentication.html https://docs.ubuntu.com/maas/$1/en/api [R=301]
RewriteRule ^/docs(2.1|2.0)/maascli.html https://docs.ubuntu.com/maas/$1/en/manage-cli [R=301]
RewriteRule ^/docs(2.1|2.0)/version.html https://docs.ubuntu.com/maas/$1/en/manage-cli [R=301]
RewriteRule ^/docs(2.1|2.0)/getting-help.html https://docs.ubuntu.com/maas/$1/en/troubleshoot-getting-help [R=301]
RewriteRule ^/docs(2.1|2.0)/troubleshooting.html https://docs.ubuntu.com/maas/$1/en/troubleshoot-faq [R=301]
RewriteRule ^/docs(2.1|2.0)/man/maas-region.8.html https://docs.ubuntu.com/maas/$1/en/manage-cli [R=301]
RewriteRule ^/docs(2.1|2.0)/man/maas.8.html https://docs.ubuntu.com/maas/$1/en/manage-cli [R=301]
RewriteRule ^/docs(2.1|2.0)/development/philosophy.html https://docs.ubuntu.com/maas/$1/en/intro-concepts [R=301]
RewriteRule ^/docs(2.1|2.0)/hacking.html https://docs.ubuntu.com/maas/$1/en/troubleshoot-faq [R=301]
RewriteRule ^/docs(2.1|2.0)/models.html https://docs.ubuntu.com/maas/$1/en/intro-concepts [R=301]
RewriteRule ^/docs(2.1|2.0)/development/security.html https://docs.ubuntu.com/maas/$1/en/installconfig-gui [R=301]
RewriteRule ^/docs(2.1|2.0)/development/building-packages.html https://docs.ubuntu.com/maas/$1/en/installconfig-package-install [R=301]
RewriteRule ^/docs(2.1|2.0)/development/cluster-registration.html https://docs.ubuntu.com/maas/$1/en/installconfig-rack [R=301]
RewriteRule ^/docs(2.1|2.0)/development/cluster-bootstrap.html https://docs.ubuntu.com/maas/$1/en/installconfig-rack [R=301]
RewriteRule ^/docs(2.1|2.0)/development/tagging.html https://docs.ubuntu.com/maas/$1/en/manage-cli-tags [R=301]
RewriteRule ^/docs(2.1|2.0)/development/preseeds.html https://docs.ubuntu.com/maas/$1/en/installconfig-deploy-nodes [R=301]
RewriteRule ^/docs(2.1|2.0)/development/metadata.html https://docs.ubuntu.com/maas/$1/en/troubleshoot-faq#maas-datasource [R=301]
RewriteRule ^/docs(2.1|2.0)/development/rpc.html https://docs.ubuntu.com/maas/$1/en/installconfig-rack [R=301]
RewriteRule ^/docs(2.1|2.0)/development/notes/* https://docs.ubuntu.com/maas/$1/en/troubleshoot-faq [R=301]
RewriteRule ^/docs(2.1|2.0)/genindex.html https://docs.ubuntu.com/maas/$1/en/ [R=301]
RewriteRule ^/docs(2.1|2.0)/search.html https://www.ubuntu.com/search [R=301]
RewriteRule ^/docs(1.9|2.0|2.1)/(.*) https://docs.ubuntu.com/maas/$1/en/$2 [R=301]

Note that URLs not explicitly mentioned here, e.g. http://maas.ubuntu.com/docs2.1/enum.html, will simply forward through to docs.ubuntu.com and end up on a 404 page (https://docs.ubuntu.com/maas/2.1/en/enum.html). I think this is the correct behaviour for pages where the content simply doesn't exist any more in any form.

@evilnick, @degville, @pmatulis please let me know if these redirects seem to make sense, or if there are others I should add.

@nottrobin nottrobin self-assigned this Feb 8, 2017
@evilnick
Copy link
Contributor

evilnick commented Feb 8, 2017

That seems to cover everything I can think of at the moment

@nottrobin
Copy link
Contributor Author

This has been done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants