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 13:12:22 UTC

[pulsar-site] branch main updated: Setup server-side redirects for missing pages (#321)

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 3d5beafdd09 Setup server-side redirects for missing pages (#321)
3d5beafdd09 is described below

commit 3d5beafdd099cef85518099b9d870cc5e295e7a1
Author: tison <wa...@gmail.com>
AuthorDate: Tue Dec 6 21:12:17 2022 +0800

    Setup server-side redirects for missing pages (#321)
    
    Signed-off-by: tison <wa...@gmail.com>
---
 site2/website-next/docs/reference-cli-tools.md |  4 ++--
 site2/website-next/scripts/httpd.conf          | 33 +++++++++++++-------------
 site2/website-next/static/.htaccess            | 10 ++++----
 3 files changed, 23 insertions(+), 24 deletions(-)

diff --git a/site2/website-next/docs/reference-cli-tools.md b/site2/website-next/docs/reference-cli-tools.md
index 3c592b19563..636ef53c074 100644
--- a/site2/website-next/docs/reference-cli-tools.md
+++ b/site2/website-next/docs/reference-cli-tools.md
@@ -20,10 +20,10 @@ For the latest and complete information about command-line tools, including comm
 
 :::
 
-All Pulsar command-line tools can be run from the `bin` directory of your [installed Pulsar package](getting-started-standalone.md). 
+All Pulsar command-line tools can be run from the `bin` directory of your [installed Pulsar package](getting-started-standalone.md).
 
 You can get help for any CLI tool, command, or subcommand using the `--help` flag, or `-h` for short. Here's an example:
 
 ```shell
 bin/pulsar broker --help
-```
\ No newline at end of file
+```
diff --git a/site2/website-next/scripts/httpd.conf b/site2/website-next/scripts/httpd.conf
index 387634c24f1..89362ae3180 100644
--- a/site2/website-next/scripts/httpd.conf
+++ b/site2/website-next/scripts/httpd.conf
@@ -2,20 +2,20 @@
 # This is the main Apache HTTP server configuration file.  It contains the
 # configuration directives that give the server its instructions.
 # See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
-# In particular, see 
+# In particular, see
 # <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
 # for a discussion of each configuration directive.
 #
 # Do NOT simply read the instructions in here without understanding
 # what they do.  They're here only as hints or reminders.  If you are unsure
-# consult the online docs. You have been warned.  
+# consult the online docs. You have been warned.
 #
 # Configuration and logfile names: If the filenames you specify for many
 # of the server's control files begin with "/" (or "drive:/" for Win32), the
 # server will use that explicit path.  If the filenames do *not* begin
 # with "/", the value of ServerRoot is prepended -- so "logs/access_log"
 # with ServerRoot set to "/usr/local/apache2" will be interpreted by the
-# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log" 
+# server as "/usr/local/apache2/logs/access_log", whereas "/logs/access_log"
 # will be interpreted as '/logs/access_log'.
 
 #
@@ -45,7 +45,7 @@ ServerRoot "/usr/local/apache2"
 # ports, instead of the default. See also the <VirtualHost>
 # directive.
 #
-# Change this to Listen on specific IP addresses as shown below to 
+# Change this to Listen on specific IP addresses as shown below to
 # prevent Apache from glomming onto all bound IP addresses.
 #
 #Listen 12.34.56.78:80
@@ -201,7 +201,7 @@ LoadModule rewrite_module modules/mod_rewrite.so
 <IfModule unixd_module>
 #
 # If you wish httpd to run as a different user or group, you must run
-# httpd as root initially and it will switch.  
+# httpd as root initially and it will switch.
 #
 # User/Group: The name (or #number) of the user/group to run httpd as.
 # It is usually good practice to create a dedicated user and group for
@@ -242,7 +242,7 @@ ServerAdmin you@example.com
 
 #
 # Deny access to the entirety of your server's filesystem. You must
-# explicitly permit access to web content directories in other 
+# explicitly permit access to web content directories in other
 # <Directory> blocks below.
 #
 <Directory />
@@ -300,8 +300,8 @@ DocumentRoot "/usr/local/apache2/htdocs"
 </IfModule>
 
 #
-# The following lines prevent .htaccess and .htpasswd files from being 
-# viewed by Web clients. 
+# The following lines prevent .htaccess and .htpasswd files from being
+# viewed by Web clients.
 #
 <Files ".ht*">
     Require all denied
@@ -322,6 +322,7 @@ ErrorLog /proc/self/fd/2
 # alert, emerg.
 #
 LogLevel warn
+# LogLevel alert rewrite:trace6
 
 <IfModule log_config_module>
     #
@@ -354,8 +355,8 @@ LogLevel warn
 
 <IfModule alias_module>
     #
-    # Redirect: Allows you to tell clients about documents that used to 
-    # exist in your server's namespace, but do not anymore. The client 
+    # Redirect: Allows you to tell clients about documents that used to
+    # exist in your server's namespace, but do not anymore. The client
     # will make a new request for the document at its new location.
     # Example:
     # Redirect permanent /foo http://www.example.com/bar
@@ -372,7 +373,7 @@ LogLevel warn
     # the filesystem path.
 
     #
-    # ScriptAlias: This controls which directories contain server scripts. 
+    # ScriptAlias: This controls which directories contain server scripts.
     # ScriptAliases are essentially the same as Aliases, except that
     # documents in the target directory are treated as applications and
     # run by the server when requested rather than as documents sent to the
@@ -484,10 +485,10 @@ LogLevel warn
 #MaxRanges unlimited
 
 #
-# EnableMMAP and EnableSendfile: On systems that support it, 
+# EnableMMAP and EnableSendfile: On systems that support it,
 # memory-mapping or the sendfile syscall may be used to deliver
 # files.  This usually improves server performance, but must
-# be turned off when serving from networked-mounted 
+# be turned off when serving from networked-mounted
 # filesystems or if support for these functions is otherwise
 # broken on your system.
 # Defaults: EnableMMAP On, EnableSendfile Off
@@ -497,9 +498,9 @@ LogLevel warn
 
 # Supplemental configuration
 #
-# The configuration files in the conf/extra/ directory can be 
-# included to add extra features or to modify the default configuration of 
-# the server, or you may simply copy their contents here and change as 
+# The configuration files in the conf/extra/ directory can be
+# included to add extra features or to modify the default configuration of
+# the server, or you may simply copy their contents here and change as
 # necessary.
 
 # Server-pool management (MPM specific)
diff --git a/site2/website-next/static/.htaccess b/site2/website-next/static/.htaccess
index 9543c2f49e8..dea52f5b0db 100755
--- a/site2/website-next/static/.htaccess
+++ b/site2/website-next/static/.htaccess
@@ -7,11 +7,9 @@ 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]
 
-# Skip if file exists
-RewriteCond %{REQUEST_FILENAME} -f
+# skip if file exists
+RewriteCond %{REQUEST_FILENAME}\/index\.html -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]
+RewriteRule "^docs/(.+/)?develop-binary-protocol(/)?$" "/docs/$1developing-binary-protocol$2" [R=301,DPI,L]
+RewriteRule "^docs/(.+/)?administration-dashboard(/)?$" "/docs/$1administration-pulsar-manager$2" [R=301,DPI,L]