From 6c20227d7e65d55f8a64e7992f5013ffeab81d0d Mon Sep 17 00:00:00 2001 From: Thomas Lange Date: Thu, 29 Jul 2021 00:34:02 +0200 Subject: Update the Apache and nginx configuration files --- .htaccess | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to '.htaccess') diff --git a/.htaccess b/.htaccess index b3203b2..e337dde 100644 --- a/.htaccess +++ b/.htaccess @@ -1,24 +1,28 @@ #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# -# Apache configuration rules [Thomas Lange ] # +# Apache configuration [Thomas Lange ] # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# # # -# This file contains rewrite rules for Apache. It's recommended to include the # -# rules directly into your Apache configuration for a better performance. Also # -# disable the AllowOverride directive within your Apache virtualhost (if it is # -# not already globally disabled for performance and security reasons both). # +# This file contains the configuration rules for the Apache HTTP server. It is # +# recommended to include these rules directly into the Apache configuration! # +# # +# Additionally, it's recommended to ensure that the AllowOverride directive is # +# disabled if these rules are included in the Apache configuration. Otherwise, # +# the Apache HTTP server is checking for .htaccess files on every request. # +# # +# AllowOverride None # # # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# #=============================================================================== -# Enable RewriteEngine +# Error pages #=============================================================================== -RewriteEngine On +ErrorDocument 403 /403.php +ErrorDocument 404 /404.php #=============================================================================== -# ErrorDocument handler +# Enable RewriteEngine #=============================================================================== -ErrorDocument 403 /403.php -ErrorDocument 404 /404.php +RewriteEngine On #=============================================================================== # Forbidden directories @@ -26,9 +30,8 @@ ErrorDocument 404 /404.php RewriteRule ^(.git|core|theme/([^/]+)/(html|lang)/) - [F] #=============================================================================== -# Main rules +# Pass requests to index.php #=============================================================================== RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d - -RewriteRule ^(.*)$ index.php [L] +RewriteRule . index.php [L] -- cgit v1.2.3