.htaccess Generator
Generate an Apache .htaccess file for 301 redirects, forcing HTTPS, and www/non-www rules.
www handling
301 redirects
# Generated by Insly Host free tools — https://host.insly.co.za/tools
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
Frequently asked questions
What is an .htaccess file?
It is a configuration file for Apache web servers that controls redirects, HTTPS enforcement, access rules and more on a per-directory basis.
Where do I put the file?
Upload it to the root directory of your website (usually public_html) and Apache applies it automatically.
Run Apache the easy way on Insly Host web hosting.
Get started