.htaccess tester
Runs in your browserPaste your .htaccess and a URL: see which rule matches, what every condition compares and where Apache sends the request. Nothing is uploaded.
Server settings
Paste an .htaccess on the left
Every rule and condition is evaluated the way Apache 2.4 does it, round by round.
What happens, round by round
Every rule and condition
Start from an example
Each one loads the rules, a matching request and the files on the server.
Tasks
Common mistakes
Apps
The default .htaccess of 41 projects, from WordPress to Nextcloud, is in the list above the editor. The cheat sheet shows each file with its source.
What the tester knows
It follows the source code of Apache 2.4, not rules of thumb.
- Rounds and loops. Rounds in .htaccess,
[L]against[END], RewriteBase, DirectoryIndex, FallbackResource and the security changes of 2.4.56 and 2.4.60. - Access rules.
Require,Order,AllowandDeny,AuthType, and blocks like<Files>and<If>are evaluated along with the rewrites. - Broken files. A typo, a directive that isn’t allowed in .htaccess or a broken regex gives a 500, as on a real server. The tester names the line and the reason.
- PHP. Most hosts run PHP-FPM, where
php_valueanswers 500. A switch under “Server settings” covers servers with mod_php. - What it can’t replay. DNS lookups, RewriteMap and MultiViews are marked as “Not fully simulated” instead of guessed.
Compared with a real Apache 2.4.58 on 27 November 2026: 277 of 278 real-world .htaccess files gave the same answer on every test request, and 441 of 441 deliberately broken files failed the same way.
Questions about the .htaccess tester
Does the tester behave exactly like Apache?
It follows the code of Apache 2.4 (mod_rewrite, mod_dir, mod_alias and the access modules) and was compared with a real Apache 2.4.58: 277 of 278 real-world .htaccess files gave the same answer on every test request. Where it can’t be sure, it says “Not fully simulated”.
Is my .htaccess uploaded?
No. The tester runs as JavaScript in your browser. Nothing you paste leaves your device.
Why does the answer take two rounds?
In .htaccess, a rule that changes the path makes Apache start over with the new path and run the same rules again. [L] only ends the current round. The picture under the editor shows each round and the rule that applied.
What do I enter under “Files and folders on the server”?
The files your rules test with -f and -d. A front controller only takes over when the requested file doesn’t exist, so the answer depends on this list. Every example brings a matching list.