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

SOLR-15177: Attempt to link to javadoc and refguide in htaccess #47

Merged
merged 1 commit into from Mar 2, 2021

Conversation

janhoy
Copy link
Contributor

@janhoy janhoy commented Mar 2, 2021

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

@janhoy janhoy requested a review from uschindler March 2, 2021 13:22
Copy link
Contributor

@uschindler uschindler left a 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]
Copy link
Contributor

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!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


# 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
Copy link
Contributor

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.

Copy link
Contributor Author

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.

@janhoy janhoy merged commit cc123c2 into apache:main/solr Mar 2, 2021
@janhoy janhoy deleted the solr15177-redirects branch March 2, 2021 19:20
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

Successfully merging this pull request may close these issues.

None yet

2 participants