Protects the .htacces file from external access

- Only the FlatPress admin and server admin should be able to access the .htacces file
This commit is contained in:
Frank Hochmuth 2023-12-14 20:45:54 +01:00 committed by GitHub
parent 1fd0f4b2bb
commit 0fc7258493
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -627,12 +627,17 @@ if (class_exists('AdminPanelAction')) {
$txt = '
# Thanks again WP :)
AddType application/x-httpd-php .php .htm .html
Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase ' . $blogroot . '
# Protects the .htacces file from external access, status code 403 "Forbidden" is output
RewriteRule ^\.htaccess$ - [F]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . ' . $blogroot . 'index.php [L]
@ -672,4 +677,4 @@ if (class_exists('AdminPanelAction')) {
admin_addpanelaction('plugin', 'prettyurls', true);
}
?>
?>