You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2021/03/02 21:02:08 UTC

[GitHub] [lucene-site] uschindler commented on a change in pull request #48: SOLR-15171 Add redirects from old Solr site to new

uschindler commented on a change in pull request #48:
URL: https://github.com/apache/lucene-site/pull/48#discussion_r585906424



##########
File path: themes/lucene/templates/htaccess.template
##########
@@ -126,19 +91,24 @@ RedirectMatch Permanent ^/nutch/(.*)$ https://nutch.apache.org/$1
 # Lucy has moved, site strcuture has changed, do don't use $1 in redirect...
 RedirectMatch Permanent ^/lucy/(.*)$ https://lucy.apache.org/
 
-# promote Solr to TLP
-# TODO: This links to the staging site for new Solr - change the redirect to TLP page
-#RedirectMatch Permanent ^/solr/(.*)$ https://solr.apache.org/$1
-RedirectMatch Permanent ^/solr/(.*)$ https://lucene-solrtlp.staged.apache.org/$1
+# Solr moved to TLP Feb 2021
+# Redirect old location of Solr release doc and javadoc to new, changed location in solr.apache.org/docs
+RedirectMatch temp ^/solr/api$ https://solr.apache.org/api/
+RedirectMatch Permanent ^/solr/(\d+_\d+_\d+)$ https://solr.apache.org/docs/$1
+# These will be further rewritten to SOLR_LATEST_RELEASE on the solr side
+RedirectMatch temp ^/solr/api/org/(.*) https://solr.apache.org/api/org/$1
+RedirectMatch temp ^/solr/api/(.*) https://solr.apache.org/api/$1
+RedirectMatch Permanent ^/solr/4_0_0-(ALPHA|BETA)(.*) https://solr.apache.org/docs/4_0_0/$2
+RedirectMatch Permanent ^/solr/api-(.*) https://solr.apache.org/docs/$1
+# Fallback redirect for anythin not caught above
+RedirectMatch Permanent ^/solr/(.*)$ https://solr.apache.org/$1

Review comment:
       This is all much too complicated! Why do we need the specializations at all. In addition they still contain duplicates (caused by the "__root"-aapend-slash-handling added on the solr side.
   
   We only need exactly one redirect; it should just replace prefix:
   
   ```
   Redirect permanent /solr https://solr.apache.org
   ``` 
   
   Everything else is handled by Solr's side. Browsers are perfectly happy with 2 or three redircets. Also the main purpose here is to tell lucene.apache.org/solr visitors that the main "permanent" target is solr.apache.org. Later redirects should be done from there, as it's on Solr's responsibility.
   
   We we also need no wildcard redirect (regex not needed). The above plain standard prefix redirect is enough. Also order of "standard prefix" redirects in apache is by length. Longest prefixes first.
   
   https://httpd.apache.org/docs/2.4/mod/mod_alias.html#redirect: "Then any request beginning with URL-path will return a redirect request to the client at the location of the target URL. Additional path information beyond the matched URL-path will be appended to the target URL."
   
   You can test all this on the Lucene staging site.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org