New stella design

This commit is contained in:
edsea
2025-08-06 05:09:22 +02:00
parent 24c3640f05
commit 8ec1ba9756
70 changed files with 1808 additions and 481 deletions

View File

@@ -1,39 +1,73 @@
# Enable the RewriteEngine
# Enable RewriteEngine
RewriteEngine On
RewriteCond %{REQUEST_URI} !(/$|\.)
RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
RewriteBase /
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Redirect URLs without trailing slashes (except index.php) to URLs with trailing slashes
RewriteCond %{REQUEST_URI} !/index.php$
RewriteRule ^([^/]+)$ /$1/ [L,R=301]
# Add trailing slash to URLs (except files and directories)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/$
RewriteRule ^(.+)$ $1/ [L,R=301]
# 404
# Handle 404 errors
ErrorDocument 404 /404
# Rewrite any single-word URL with a trailing slash like /about/ to index.php?page=about
# Rewrite pretty URLs to index.php?page=
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^/]+)/$ index.php?page=$1 [L,QSA]
# Enable GZip compression
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/html text/plain text/xml
AddOutputFilterByType DEFLATE text/css text/javascript application/javascript
AddOutputFilterByType DEFLATE application/x-javascript application/json
AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
AddOutputFilterByType DEFLATE application/javascript application/json
AddOutputFilterByType DEFLATE application/xml application/xhtml+xml application/rss+xml
AddOutputFilterByType DEFLATE application/font-woff application/font-woff2
AddOutputFilterByType DEFLATE image/svg+xml
AddOutputFilterByType DEFLATE image/svg+xml image/webp
</IfModule>
# Enable browser caching for static assets
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 year"
ExpiresByType text/css "access plus 1 month"
ExpiresByType application/javascript "access plus 1 month"
ExpiresByType image/x-icon "access plus 1 year"
ExpiresByType application/font-woff "access plus 1 year"
ExpiresByType application/font-woff2 "access plus 1 year"
</IfModule>
# Prevent hotlinking (allow empty referrers and local/dev environments)
<IfModule mod_rewrite.c>
# Allow empty referrers (direct requests, private browsing)
# Allow stellaamor.com, local dev, and localhost
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?stellaamor\.com/ [NC]
RewriteCond %{HTTP_REFERER} !^http?://stellaamor\.local [NC]
RewriteCond %{HTTP_REFERER} !^http?://127\.0\.0\.1 [NC]
RewriteCond %{HTTP_REFERER} !^http?://localhost [NC]
RewriteRule \.(jpg|jpeg|png|gif|svg|webp|css|js|woff|woff2)$ - [NC,F,L]
</IfModule>
# Security headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "DENY"
Header set X-XSS-Protection "1; mode=block"
</IfModule>
# Prevent directory listing
Options -Indexes
# BEGIN cPanel-generated php ini directives, do not edit
# Manual editing of this file may result in unexpected behavior.
# To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor)
# For more information, read our documentation (https://go.cpanel.net/EA4ModifyINI)
<IfModule php8_module>
php_value output_buffering Off
</IfModule>
<IfModule lsapi_module>
php_value output_buffering Off
</IfModule>
# END cPanel-generated php ini directives, do not edit
# END cPanel-generated php ini directives, do not edit