RewriteEngine On RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME}.php -f RewriteRule ^([^/]+)/?$ $1.php [L] # Redirect to HTTPS with a 301 redirect RewriteCond %{HTTPS} off RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] RewriteRule ^api/([^/]+)/?$ api/$1.php [L] RewriteRule ^sitemap\.xml$ sitemap.php [L] # Set canonical URL for HTML documents # # Header set Link "; rel=\"canonical\"" # RewriteCond %{HTTP_HOST} ^https://www.tech4bizsolutions.com$ [NC] RewriteRule ^(.*)$ https://tech4bizsolutions.com/$1 [R=301,L] # php -- BEGIN cPanel-generated handler, do not edit # Set the “ea-php82” package as the default “PHP” programming language. AddHandler application/x-httpd-ea-php82___lsphp .php .php8 .phtml # php -- END cPanel-generated handler, do not edit