[edit]
HTAccess: Website Examples
RewriteEngine On
RewriteOptions inherit
RewriteCond %{HTTPS} off
RewriteCond %{HTTP:X-Forwarded-SSL} !on
RewriteCond %{HTTP_HOST} ^berladyn.online$ [OR]
RewriteCond %{HTTP_HOST} ^www.berladyn.online$
RewriteRule ^/?$ "https://berladyn.online/" [R=301,L]
RewriteCond %{HTTP_HOST} ^berladyn.online$ [OR]
RewriteCond %{HTTP_HOST} ^www.berladyn.online$
RewriteRule ^directory.php$ "https://berladyn.online/directory.php" [R=301,L]
AddHandler application/x-httpd-ea-php74 .php .php7 .phtml
# secure htaccess file
order allow,deny
deny from all
# Limit bandwidth consumption
php_value zlib.output_compression 16386
RewriteEngine On
RewriteCond %{REQUEST_URI} !.php$ [NC]
RewriteCond %{REQUEST_URI} [^/]$
RewriteRule ^([^.]+)$ $1.php [NC,L]
mod_gzip_on Yes
mod_gzip_dechunk Yes
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
mod_gzip_item_include handler ^cgi-script$
mod_gzip_item_include mime ^text/.*
mod_gzip_item_include mime ^application/x-javascript.*
mod_gzip_item_exclude mime ^image/.*
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
# Secure php.ini and .htaccess
RewriteRule ^(php\.ini|\.htaccess) - [NC,F]
#Enable PHP short open tags
php_value short_open_tag 1