[openstack-dev] [all][docs] 404s on docs website after the great reorg

Doug Hellmann doug at doughellmann.com
Thu Jul 27 20:24:07 UTC 2017


Excerpts from Doug Hellmann's message of 2017-07-27 14:24:53 -0400:
> Excerpts from Jeremy Stanley's message of 2017-07-27 16:40:08 +0000:
> > On 2017-07-27 12:23:39 -0400 (-0400), Sean Dague wrote:
> > > In the #openstack-nova channel this morning we were debugging some cells
> > > v2 things, and ran into the fact that the online docs for this -
> > > https://docs.openstack.org/nova/latest/cells.html go to a 404. That's a
> > > previously well known link, people have it in their browser history,
> > > bookmarks, wiki pages, other websites.
> > > 
> > > My understanding of big moves like this is that redirects are important.
> > > Things going blackhole like that not only is an inconvenience to users,
> > > but impacts our search engine rankings, and takes a while for them to
> > > all sift out. I know in sites I run I'm still regularly getting in
> > > bounds to paths on the site that haven't been there for 8 years.
> > > 
> > > It would be really good if we had a way (manual or automated) to have
> > > 301 redirects, that are fixable by the teams that now own the
> > > documentation (the project teams).
> > 
> > We can look at including .htaccess files in the tree I guess? Or
> > some metadata the publish job uses to build them maybe?
> 
> That's exactly what I was thinking.
> 
> 1. Enable .htaccess files by turning on allowoverride for
>    docs.openstack.org.
> 
> 2. Add .htaccess files in each tree, as needed (see
>    https://review.openstack.org/487932 for an example of how this
>    is done with sphinx).
> 
> 3. Update the main .htaccess file in openstack-manuals to redirect
>    from the old location of docs in a way that passes the full path.
>    Right now we redirect to /project/latest/:
> 
>       redirectmatch 301 "^/developer/([^/]+)/.*$" /$1/latest/
> 
>    I think that would change to look something like:
> 
>       redirectmatch 301 "^/developer/([^/]+)/(.*)$" /$1/latest/$2
> 
>    We would only want to do that for projects that actually have
>    .htaccess files, so we can put a flag in the project-data files in
>    openstack-manuals and generate project-specific redirect rules (we're
>    already doing that for some other pages).
> 
> Then when someone visits docs.o.o/developer/nova/cells.html it would
> redirect to docs.o.o/nova/latest/cells.html. The nova team then
> need to have a redirect from docs.o.o/nova/latest/cells.html to
> docs.o.o/nova/latest/user/cells.html.
> 
> If folks think that's a good approach, I will start on the patches
> needed in infra and openstack-manuals (1 and 3).
> 
> Doug
> 

The patches are up using the topic in-tree-redirects:

https://review.openstack.org/#/q/topic:in-tree-redirects



More information about the OpenStack-dev mailing list