Minor fixes to .htaccess
This commit is contained in:
committed by
Bastian Allgeier
parent
61729df53a
commit
5f025ac2c2
18
.htaccess
18
.htaccess
@@ -1,4 +1,5 @@
|
||||
# Kirby .htaccess
|
||||
# revision 2020-06-15
|
||||
|
||||
# rewrite rules
|
||||
<IfModule mod_rewrite.c>
|
||||
@@ -8,11 +9,11 @@
|
||||
RewriteEngine on
|
||||
|
||||
# make sure to set the RewriteBase correctly
|
||||
# if you are running the site in a subfolder.
|
||||
# Otherwise links or the entire site will break.
|
||||
# if you are running the site in a subfolder;
|
||||
# otherwise links or the entire site will break.
|
||||
#
|
||||
# If your homepage is http://yourdomain.com/mysite
|
||||
# Set the RewriteBase to:
|
||||
# If your homepage is http://yourdomain.com/mysite,
|
||||
# set the RewriteBase to:
|
||||
#
|
||||
# RewriteBase /mysite
|
||||
|
||||
@@ -29,13 +30,9 @@ RewriteRule (^|/)\.(?!well-known\/) index.php [L]
|
||||
RewriteRule ^content/(.*) index.php [L]
|
||||
|
||||
# block all files in the site folder from being accessed directly
|
||||
# except for requests to plugin assets files
|
||||
RewriteRule ^site/(.*) index.php [L]
|
||||
|
||||
# Enable authentication header
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
|
||||
# block direct access to kirby and the panel sources
|
||||
# block direct access to Kirby and the Panel sources
|
||||
RewriteRule ^kirby/(.*) index.php [L]
|
||||
|
||||
# make site links work
|
||||
@@ -45,6 +42,9 @@ RewriteRule ^(.*) index.php [L]
|
||||
|
||||
</IfModule>
|
||||
|
||||
# pass the Authorization header to PHP
|
||||
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
|
||||
|
||||
# compress text file responses
|
||||
<IfModule mod_deflate.c>
|
||||
AddOutputFilterByType DEFLATE text/plain
|
||||
|
Reference in New Issue
Block a user