document deployment without .htaccess #651

Closed
opened 2026-02-04 21:35:55 +03:00 by OVERLORD · 2 comments
Owner

Originally created by @benrubson on GitHub (Apr 21, 2018).

Hi,

Would be nice to add to the documentation rules required by an Apache VirtualHost for a deployment without .htaccess file.
There is a performance hit enabling .htaccess files, as well as some security concerns.

Rewrite rules should ideally be given outside of <Directory> sections, so that an additional / unwanted Options +FollowSymLinks is not needed.

Thank you 👍

Ben

Originally created by @benrubson on GitHub (Apr 21, 2018). Hi, Would be nice to add to the documentation rules required by an Apache VirtualHost for a deployment without `.htaccess` file. There is a performance hit enabling `.htaccess` files, as well as some security concerns. Rewrite rules should ideally be given outside of `<Directory>` sections, so that an additional / unwanted `Options +FollowSymLinks` is not needed. Thank you 👍 Ben
Author
Owner

@benrubson commented on GitHub (Apr 21, 2018):

Here is what I had to add to my Apache VirtualHost :

RewriteEngine On
# From public/.htaccess
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteRule ^(.*)/$ /$1 [L,R=301]
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f
RewriteRule ^ /index.php [L]
@benrubson commented on GitHub (Apr 21, 2018): Here is what I had to add to my Apache VirtualHost : ``` RewriteEngine On # From public/.htaccess RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteRule ^(.*)/$ /$1 [L,R=301] RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-d RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME} !-f RewriteRule ^ /index.php [L] ```
Author
Owner

@watschi commented on GitHub (Apr 21, 2018):

I think these are already in the official documentation

@watschi commented on GitHub (Apr 21, 2018): I think these are already in [the official documentation](https://www.bookstackapp.com/docs/admin/installation/)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#651