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
SOLR-15177: Attempt to link to javadoc and refguide in htaccess #47
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi,
in general this should all work, see inlined comments.
Testing is hard, let's go to production and fix the links after release. No way otherwise.
But it's not too risky.
For the subversion folder we should look for a better alternative anywayss. Maybe also split the folder in svn. But for now it's OK.
|
||
# __root/docs.lucene.apache.org/content/ is a special alias added by INFRA-19439, so we can refer to stuff in other places like SVN: | ||
RewriteRule ^(core|solr)/\d+_\d+_\d+/.*$ __root/docs.lucene.apache.org/content/$0 [PT] | ||
RewriteRule ^solr/guide/\d+_\d+/.*$ __root/docs.lucene.apache.org/content/$0 [PT] | ||
RewriteRule ^docs/(\d+_\d+_\d+/.*)$ __root/docs.lucene.apache.org/content/solr/$1 [PT] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should work using capture group, I think!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, looks like it is supported: https://httpd.apache.org/docs/2.4/rewrite/intro.html#InternalBackRefs
|
||
# redirect older point versions to latest (to keep number of javadocs small): | ||
RedirectMatch Permanent ^/solr/4_0_0-(ALPHA|BETA)(.*) /solr/4_0_0$2 | ||
RedirectMatch Permanent ^/solr/api-(.*) /solr/$1 | ||
RedirectMatch Permanent ^/docs/4_0_0-(ALPHA|BETA)(.*) /docs/4_0_0$2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if we need those, as the solr.apache.org site is new, so the "old" redirects should not be there anyways. It depends on the redirects on Lucene side: If we have a general perm (301) redirect from lucene.apache.org/solr/ -> solr.apache.org/, we should keep them here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, on the Lucene side of things I think we can do like this, except the /solr/X_Y_Z which must be rewritten to /docs/X_Y_Z. So putting those rules first and fallback to the generic rule shold do the trick.
Non-tested rewrite rule magic to link in refguide at https://solr.apache.org/guide/X_Y and javadoc at https://solr.apache.org/docs/X_Y_Z/ on the new Solr site
https://issues.apache.org/jira/browse/SOLR-15177