diff options
author | Thomas Lange <code@nerdmind.de> | 2021-07-29 00:34:02 +0200 |
---|---|---|
committer | Thomas Lange <code@nerdmind.de> | 2021-07-29 00:34:02 +0200 |
commit | 6c20227d7e65d55f8a64e7992f5013ffeab81d0d (patch) | |
tree | 63138284a4598aad0277be9ede70192ca9eaaa30 /.htaccess | |
parent | b605b73bbd0eaf314803b6c8c28bff000878d84c (diff) | |
download | blog-6c20227d7e65d55f8a64e7992f5013ffeab81d0d.tar.gz blog-6c20227d7e65d55f8a64e7992f5013ffeab81d0d.tar.xz blog-6c20227d7e65d55f8a64e7992f5013ffeab81d0d.zip |
Update the Apache and nginx configuration files
Diffstat (limited to '.htaccess')
-rw-r--r-- | .htaccess | 29 |
1 files changed, 16 insertions, 13 deletions
@@ -1,24 +1,28 @@ #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# -# Apache configuration rules [Thomas Lange <code@nerdmind.de>] # +# Apache configuration [Thomas Lange <code@nerdmind.de>] # #%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%# # # -# 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] |