# Custom Error Documents (*will send email notification to admin via 'customTracking/404_notifications.php' include ErrorDocument 404 /404.php?code=404 ErrorDocument 500 /404.php?code=500 # Enable rewrite engine RewriteEngine On # Enforce HTTPS redirection (ensure all traffic goes to HTTPS) RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Handle any subdirectory and slug RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/([^/]+)/?$ $1.php?slug=$2 [L,QSA] # Rewrite rule to trigger a 500 Internal Server Error for testing - (*page must be identified in sitemap for 500 trigger test to work) # un-comment line below and then go to 'website.com/trigger500' to trigger 500 error test # RewriteRule ^trigger500$ - [R=500,L] # Handle pretty URLs (rewrite /subpage to /subpage.php) RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^.]+)$ $1.php [L] # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php74” package as the default “PHP” programming language. AddHandler application/x-httpd-ea-php74 .php .php7 .phtml # php -- END cPanel-generated handler, do not edit