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



##########
File path: themes/solr/templates/htaccess.template
##########
@@ -46,33 +46,32 @@ RedirectMatch Permanent ^mirrors-solr-3x-redir 
downloads.html
 RedirectMatch Permanent ^mirrors-solr-redir.html downloads.html
 
 # Simple redirect to "directory", so later rules match
-RedirectMatch temp ^/(core|solr)/api$ $0/
-RedirectMatch Permanent ^/(core|solr)/\d+_\d+_\d+$ $0/
-RedirectMatch Permanent ^/solr/guide/\d+_\d+$ $0/
+RedirectMatch temp ^/api$ $0/
+RedirectMatch Permanent ^/docs/\d+_\d+_\d+$ $0/
+RedirectMatch Permanent ^/guide/\d+_\d+$ $0/
 
 # Other pages can always be redirected to the "most current" released javadocs
 # using "temp" instead of permanent so crawlers know that they
 # might change again in the future
-RedirectMatch temp ^/core/api/(.*) /core/{{ SOLR_LATEST_RELEASE | replace(".", 
"_") }}/$1
-RedirectMatch temp ^/solr/api/org/(.*) /solr/{{ SOLR_LATEST_RELEASE | 
replace(".", "_") }}/solr-core/org/$1
-RedirectMatch temp ^/solr/api/(.*) /solr/{{ SOLR_LATEST_RELEASE | replace(".", 
"_") }}/$1
-RedirectMatch temp ^/solr/guide/(?!index.html)([a-z].*) /solr/guide/{{ 
SOLR_LATEST_RELEASE.rsplit(".", 1) | first | replace(".", "_") }}/$1
+RedirectMatch temp ^/api/org/(.*) /docs/{{ SOLR_LATEST_RELEASE | replace(".", 
"_") }}/solr-core/org/$1
+RedirectMatch temp ^/api/(.*) /docs/{{ SOLR_LATEST_RELEASE | replace(".", "_") 
}}/$1
+RedirectMatch temp ^/guide/(?!index.html)([a-z].*) /guide/{{ 
SOLR_LATEST_RELEASE.rsplit(".", 1) | first | replace(".", "_") }}/$1
 
 # Solr Tutorial is now in the Solr Ref Guide
 # should redirect automatically to latest version
-RedirectMatch Permanent ^/quickstart.html /solr/guide/solr-tutorial.html
+RedirectMatch Permanent ^/quickstart.html /guide/solr-tutorial.html
 
 # 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

Review comment:
       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.

##########
File path: themes/solr/templates/htaccess.template
##########
@@ -46,33 +46,32 @@ RedirectMatch Permanent ^mirrors-solr-3x-redir 
downloads.html
 RedirectMatch Permanent ^mirrors-solr-redir.html downloads.html
 
 # Simple redirect to "directory", so later rules match
-RedirectMatch temp ^/(core|solr)/api$ $0/
-RedirectMatch Permanent ^/(core|solr)/\d+_\d+_\d+$ $0/
-RedirectMatch Permanent ^/solr/guide/\d+_\d+$ $0/
+RedirectMatch temp ^/api$ $0/
+RedirectMatch Permanent ^/docs/\d+_\d+_\d+$ $0/
+RedirectMatch Permanent ^/guide/\d+_\d+$ $0/
 
 # Other pages can always be redirected to the "most current" released javadocs
 # using "temp" instead of permanent so crawlers know that they
 # might change again in the future
-RedirectMatch temp ^/core/api/(.*) /core/{{ SOLR_LATEST_RELEASE | replace(".", 
"_") }}/$1
-RedirectMatch temp ^/solr/api/org/(.*) /solr/{{ SOLR_LATEST_RELEASE | 
replace(".", "_") }}/solr-core/org/$1
-RedirectMatch temp ^/solr/api/(.*) /solr/{{ SOLR_LATEST_RELEASE | replace(".", 
"_") }}/$1
-RedirectMatch temp ^/solr/guide/(?!index.html)([a-z].*) /solr/guide/{{ 
SOLR_LATEST_RELEASE.rsplit(".", 1) | first | replace(".", "_") }}/$1
+RedirectMatch temp ^/api/org/(.*) /docs/{{ SOLR_LATEST_RELEASE | replace(".", 
"_") }}/solr-core/org/$1
+RedirectMatch temp ^/api/(.*) /docs/{{ SOLR_LATEST_RELEASE | replace(".", "_") 
}}/$1
+RedirectMatch temp ^/guide/(?!index.html)([a-z].*) /guide/{{ 
SOLR_LATEST_RELEASE.rsplit(".", 1) | first | replace(".", "_") }}/$1
 
 # Solr Tutorial is now in the Solr Ref Guide
 # should redirect automatically to latest version
-RedirectMatch Permanent ^/quickstart.html /solr/guide/solr-tutorial.html
+RedirectMatch Permanent ^/quickstart.html /guide/solr-tutorial.html
 
 # 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
+RedirectMatch Permanent ^/docs/api-(.*) /docs/$1
 
 ### Javadocs & Solr Refguide
 
 # Hack: Append slash, if folder name does not end with slash - everything 
containing a "." is treated as file and excluded from redirect:
-RewriteRule ^(core|solr)/\d+_\d+_\d+/(?!.+\.\w+$|.+/$).+$   $0/ [R=301,L]
-RewriteRule ^solr/guide/\d+_\d+/(?!.+\.\w+$|.+/$).+$        $0/ [R=301,L]
+RewriteRule ^docs/\d+_\d+_\d+/(?!.+\.\w+$|.+/$).+$          $0/ [R=301,L]
+RewriteRule ^guide/\d+_\d+/(?!.+\.\w+$|.+/$).+$             $0/ [R=301,L]
 
 # __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]

Review comment:
       should work using capture group, I think!




----------------------------------------------------------------
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:
us...@infra.apache.org



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

Reply via email to