View file File name : htaccess Content :# Enable Rewrite Engine RewriteEngine On # STEP 1: Force HTTPS (redirect HTTP to HTTPS) RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # STEP 2: Fix orphan pages - Remove www from all URLs # This prevents duplicate content (http://crypt0pulse.com, https://crypt0pulse.com, https://www.crypt0pulse.com) # Consolidate to: https://crypt0pulse.com (non-www preferred) RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC] RewriteRule ^(.*)$ https://%1%{REQUEST_URI} [R=301,L] # STEP 3: SEO - Enforce trailing slash consistency (optional, can be removed if not needed) # RewriteCond %{REQUEST_FILENAME} !-f # RewriteCond %{REQUEST_FILENAME} !-d # RewriteCond %{REQUEST_URI} !/$ [NC] # RewriteRule ^(.+)$ /$1/ [R=301,L] # Default index files DirectoryIndex index.html index.htm crypto-pulse-landing.html # Enable symbolic links Options +FollowSymLinks # Disable directory browsing Options -Indexes # Allow access to images folder <FilesMatch "\.(jpg|jpeg|png|gif|svg|webp|ico)$"> Order Allow,Deny Allow from all </FilesMatch> # Allow access to CSS and JS files <FilesMatch "\.(css|js)$"> Order Allow,Deny Allow from all </FilesMatch> # Enable CORS for images (if needed for external loading) <IfModule mod_headers.c> <FilesMatch "\.(jpg|jpeg|png|gif|svg|webp|ico)$"> Header set Access-Control-Allow-Origin "*" </FilesMatch> </IfModule> # Set proper MIME types <IfModule mod_mime.c> AddType image/jpeg .jpg .jpeg AddType image/png .png AddType image/gif .gif AddType image/svg+xml .svg AddType image/webp .webp AddType image/x-icon .ico AddType text/html .html .htm AddType text/css .css AddType application/javascript .js </IfModule> # Enable Gzip compression <IfModule mod_deflate.c> AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/javascript application/json image/svg+xml </IfModule> # Browser caching <IfModule mod_expires.c> ExpiresActive On # Images ExpiresByType image/jpeg "access plus 1 year" ExpiresByType image/png "access plus 1 year" ExpiresByType image/gif "access plus 1 year" ExpiresByType image/svg+xml "access plus 1 year" ExpiresByType image/webp "access plus 1 year" ExpiresByType image/x-icon "access plus 1 year" # CSS and JavaScript ExpiresByType text/css "access plus 1 month" ExpiresByType application/javascript "access plus 1 month" # HTML ExpiresByType text/html "access plus 0 seconds" </IfModule> # Security Headers & SEO Optimization <IfModule mod_headers.c> # Prevent clickjacking Header always set X-Frame-Options "SAMEORIGIN" # XSS Protection Header always set X-XSS-Protection "1; mode=block" # Prevent MIME sniffing Header always set X-Content-Type-Options "nosniff" # Referrer Policy Header always set Referrer-Policy "strict-origin-when-cross-origin" # Permissions Policy (formerly Feature Policy) Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()" # Enable caching control for static resources <FilesMatch "\.(jpg|jpeg|png|gif|svg|webp|ico|css|js|json)$"> Header set Cache-Control "public, max-age=31536000, immutable" </FilesMatch> # No caching for HTML files <FilesMatch "\.(html|htm)$"> Header set Cache-Control "no-cache, must-revalidate" Header set Pragma "no-cache" Header set Expires "0" </FilesMatch> </IfModule> # Protect sensitive files <FilesMatch "^\."> Order allow,deny Deny from all </FilesMatch> # Error pages (optional - create these files if needed) # ErrorDocument 404 /404.html # ErrorDocument 500 /500.html # PHP settings (if using PHP) # php_value upload_max_filesize 10M # php_value post_max_size 10M # php_value memory_limit 128M # Prevent access to backup and log files <FilesMatch "\.(bak|config|sql|log|sh|inc|swp)$"> Order allow,deny Deny from all </FilesMatch> # UTF-8 encoding AddDefaultCharset UTF-8 # Fix for images not loading - Remove query strings from static resources <IfModule mod_rewrite.c> RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_URI} \.(jpg|jpeg|png|gif|svg|css|js)$ [NC] RewriteRule ^(.+)\?.*$ /$1 [L] </IfModule>