You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by ti...@apache.org on 2022/12/06 07:45:21 UTC

[pulsar-site] branch main updated: server-side redirections for missing pages (#320)

This is an automated email from the ASF dual-hosted git repository.

tison pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-site.git


The following commit(s) were added to refs/heads/main by this push:
     new ebbdb846d23 server-side redirections for missing pages (#320)
ebbdb846d23 is described below

commit ebbdb846d23c558993cb5e51b5f85d2610f62adb
Author: tison <wa...@gmail.com>
AuthorDate: Tue Dec 6 15:45:16 2022 +0800

    server-side redirections for missing pages (#320)
    
    Signed-off-by: tison <wa...@gmail.com>
---
 site2/website-next/static/.htaccess | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/site2/website-next/static/.htaccess b/site2/website-next/static/.htaccess
index d00a5b4159f..9543c2f49e8 100755
--- a/site2/website-next/static/.htaccess
+++ b/site2/website-next/static/.htaccess
@@ -7,4 +7,11 @@ RewriteRule "^(zh-CN|zh-TW|ja|ko|fr)/docs/(.+)$" "/docs/$2" [R=301,DPI,L]
 RewriteRule "^docs$" "/docs/" [R=301,DPI,L]
 RewriteRule "^docs/(.+)-incubating/(.+)$" "https://pulsar.staged.apache.org/docs/$1-incubating/$2" [R=301,DPI,L]
 
-RewriteRule "^docs/(.*)develop-binary-protocol(.*)$" "/docs/$1developing-binary-protocol$2" [R=301,DPI,L]
+# Skip if file exists
+RewriteCond %{REQUEST_FILENAME} -f
+RewriteRule ^ - [L]
+
+RewriteRule "^docs/develop-binary-protocol$" "/docs/developing-binary-protocol/" [R=301,DPI,END]
+RewriteRule "^docs/develop-binary-protocol/$" "/docs/developing-binary-protocol/" [R=301,DPI,END]
+RewriteRule "^docs/(.+)/develop-binary-protocol$" "/docs/$1/developing-binary-protocol/" [R=301,DPI,END]
+RewriteRule "^docs/(.+)/develop-binary-protocol/$" "/docs/$1/developing-binary-protocol/" [R=301,DPI,END]