.htaccess Generator
Build Apache .htaccess rules visually. Select options, copy or download the result.
# Select options above to generate .htaccess rules
Frequently Asked Questions
What is a .htaccess file?
A .htaccess file is an Apache web server configuration file. It lets you control server behavior — redirects, caching, access rules, security headers — on a per-directory basis, without editing the main server config.
Where do I upload the .htaccess file?
Upload it to the root directory of your website (usually public_html or www). The filename must be exactly .htaccess — with the leading dot and no file extension.
Does this work on Nginx servers?
No. .htaccess is specific to the Apache web server. Nginx uses a different syntax in its nginx.conf file. If your site runs on Nginx, these rules will not work.
Is my data private?
Yes. Everything runs in your browser. Your selections never leave your device and no data is sent to any server.
How do I test rules safely before deploying?
Always back up your existing .htaccess first. A bad rule can return HTTP 500 errors across your site. Test on a staging server or a single folder before deploying to production.