WordPress Tools Embed Tool
.htaccess Generator for WordPress
Build a safe WordPress .htaccess with HTTPS, www rules, GZIP, caching, security headers and 301 redirects.
.htaccess Generator for WordPress
Tick what you need and get a clean .htaccess with the standard WordPress block kept intact, plus a file that blocks PHP in uploads.
Redirects
Features
Custom 301 redirects
Second file: block PHP in the uploads folder
Save as wp-content/uploads/.htaccess. A hacked upload can no longer run as PHP.
Stays localEverything runs in your own browser. Nothing you type is sent to a server or stored.
Found a Bug or Missing a Feature?
Report any problems or suggest new features you want. You can write in English, Urdu, Hindi, or any language! Our AI will analyze your feedback and upgrade the tool.
About This Tool
Build a safe WordPress .htaccess with HTTPS, www rules, GZIP, caching, security headers and 301 redirects.
A broken .htaccess file takes a WordPress site down with a 500 error, and a missing rule leaves it slower and less secure than it should be. This generator builds a clean file from a set of switches, keeps the standard WordPress block intact, and gives you a second small file that stops PHP running inside your uploads folder.
How to use it
- Choose whether you want www, non-www, or neither forced.
- Tick the features you want: HTTPS redirect, GZIP, browser caching, security headers and so on.
- Add any 301 redirects, one per line, in the form
/old-path /new-path. - Copy the result and replace the contents of the .htaccess file in your site's root folder.
- Save the second file as
wp-content/uploads/.htaccessif you want PHP blocked in uploads.