This is an automated email from the ASF dual-hosted git repository.
alamb pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/datafusion-site.git
The following commit(s) were added to refs/heads/asf-site by this push:
new 96c6eb5 Try some new rewrite rules
96c6eb5 is described below
commit 96c6eb505404f88c7d5ef950aa6d6654c9746810
Author: Andrew Lamb <[email protected]>
AuthorDate: Sat Dec 20 06:38:36 2025 -0500
Try some new rewrite rules
---
.htaccess | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/.htaccess b/.htaccess
index dac2b91..43fe0d6 100644
--- a/.htaccess
+++ b/.htaccess
@@ -1,6 +1,21 @@
# redirect urls to the output directory
-# https://issues.apache.org/jira/browse/INFRA-27512
+# See https://issues.apache.org/jira/browse/INFRA-27512
RewriteEngine On
+
+# Redirect extensionless, non-output, non-slash URLs to the trailing-slash form
+# (example: /blog/2025/12/15/post -> /blog/2025/12/15/post/).
+RewriteCond %{ENV:REDIRECT_STATUS} ^$
+# Skip URLs already rewritten once to avoid loops (example: /blog/output/...).
+RewriteCond %{REQUEST_URI} !/output/
+# Skip URLs that already end with a slash (example: /blog/2025/12/15/post/).
+RewriteCond %{REQUEST_URI} !/$
+# Skip URLs that look like files (have an extension) (example:
/blog/theme/css/style.css).
+RewriteCond %{REQUEST_URI} !\.[^./]+$
+# Redirect example: /blog/2025/12/15/post -> /blog/2025/12/15/post/
+RewriteRule ^(.+)$ $1/ [R=301,L]
+
RewriteCond %{ENV:REDIRECT_STATUS} ^$
-RewriteRule ^(.*)$ output/$1 [L]
\ No newline at end of file
+# Rewrite all requests to the Pelican output/ directory
+# (example: /blog/2025/12/15/post/ -> /blog/output/2025/12/15/post/).
+RewriteRule ^(.*)$ output/$1 [L]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]