mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-11-23 03:12:32 +01:00
Fixed canonical redirects on non-root url app instances
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 Synced with: https://github.com/laravel/laravel/blob/master/public/.htaccess
This commit is contained in:
parent
d48ac0a37d
commit
1e88e8086f
@ -11,9 +11,10 @@
|
|||||||
|
|
||||||
# Redirect Trailing Slashes If Not A Folder...
|
# Redirect Trailing Slashes If Not A Folder...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
RewriteCond %{REQUEST_URI} (.+)/$
|
||||||
|
RewriteRule ^ %1 [L,R=301]
|
||||||
|
|
||||||
# Handle Front Controller...
|
# Send Requests To Front Controller...
|
||||||
RewriteCond %{REQUEST_FILENAME} !-d
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
RewriteCond %{REQUEST_FILENAME} !-f
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
RewriteRule ^ index.php [L]
|
RewriteRule ^ index.php [L]
|
||||||
|
Loading…
Reference in New Issue
Block a user