]> BookStack Code Mirror - website/commitdiff
Updated apache rules in installation docs
authorDan Brown <redacted>
Sat, 23 Jan 2021 18:36:06 +0000 (18:36 +0000)
committerDan Brown <redacted>
Sat, 23 Jan 2021 18:36:06 +0000 (18:36 +0000)
content/docs/admin/installation.md

index ed7df7e02f3b2305d52aef8849383a820e475f0e..46e29535f0f6e18705a2d8001e4e4bc2d8de183f 100644 (file)
@@ -71,10 +71,23 @@ git clone https://github.com/BookStackApp/BookStack.git --branch release --singl
 
 Ensure `mod_rewrite` is enabled.
 
-```apache
-Options +FollowSymLinks
+```xml
+<IfModule mod_negotiation.c>
+    Options -MultiViews -Indexes
+</IfModule>
+
 RewriteEngine On
 
+# Handle Authorization Header
+RewriteCond %{HTTP:Authorization} .
+RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
+
+# Redirect Trailing Slashes If Not A Folder...
+RewriteCond %{REQUEST_FILENAME} !-d
+RewriteCond %{REQUEST_URI} (.+)/$
+RewriteRule ^ %1 [L,R=301]
+
+# Send Requests To Front Controller...
 RewriteCond %{REQUEST_FILENAME} !-d
 RewriteCond %{REQUEST_FILENAME} !-f
 RewriteRule ^ index.php [L]