[PR #2272] [MERGED] Fixed canonical redirects on non-root url app instances #5971

Closed
opened 2026-02-05 10:21:36 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/2272
Author: @jakubboucek
Created: 9/23/2020
Status: Merged
Merged: 9/28/2020
Merged by: @ssddanbrown

Base: masterHead: feature/fix-invalid-canonical-redirect


📝 Commits (1)

  • 1e88e80 Fixed canonical redirects on non-root url app instances

📊 Changes

1 file changed (+3 additions, -2 deletions)

View changed files

📝 public/.htaccess (+3 -2)

📄 Description

If BookStack instance is deployed to any non-root path, e.g. http://example.com/wiki/,
requests for http://example.com/wiki/shelves/
was redirected to http://example.com/shelves
instead of http://example.com/wiki/shelves.

%{REQUEST_URI} contains whole URL path, script path included.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/BookStackApp/BookStack/pull/2272 **Author:** [@jakubboucek](https://github.com/jakubboucek) **Created:** 9/23/2020 **Status:** ✅ Merged **Merged:** 9/28/2020 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `master` ← **Head:** `feature/fix-invalid-canonical-redirect` --- ### 📝 Commits (1) - [`1e88e80`](https://github.com/BookStackApp/BookStack/commit/1e88e8086f9db19ae7782b12f06e9c47dd772240) Fixed canonical redirects on non-root url app instances ### 📊 Changes **1 file changed** (+3 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `public/.htaccess` (+3 -2) </details> ### 📄 Description If BookStack instance is deployed to any non-root path, e.g. `http://example.com/wiki/`, requests for `http://example.com/wiki/shelves/` was redirected to `http://example.com/shelves` instead of `http://example.com/wiki/shelves`. `%{REQUEST_URI}` contains whole URL path, script path included. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:21:36 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5971