Server Configuration & Redirects
.htaccess Generator & Redirect Tool
Quickly generate tested Apache .htaccess rules for HTTPS redirection, canonical www/non-www handling, 301 permanent redirects, Gzip compression, and browser caching.
Where Do I Put the .htaccess File?
Save this file as .htaccess (with a leading period) and upload it to the root directory of your Apache web server (usually public_html or /var/www/html/).