Search 110+ free tools… (e.g. json, vpn, password) ⌘K
Link Tools Dereferer Hide Referrer Link URL Shortener Affiliate Cloaker PayPal Links PayPal DonationPayPal Links Privacy Tools Password Generator Cloudflare Resolver My Referrer Torrent Tools Magnet → Torrent Torrent → Magnet Torrent Editor Pirate Bay Proxies Movierulz Proxies ExtraTorrent Proxies Dev Tools Base64 Encoder Hash Generator HTTP Headers Disposable Email Checker Company Blog About Us Contact Anonymize Free
Developer Tool

htaccess Tester

Paste your Apache .htaccess rules and test them against a URL path — validate RewriteRule patterns and debug redirects instantly.

Enter the path you want to test against your rules

Common flags: [R=301,L] — permanent redirect
[L] — last rule, stop
[QSA] — append query string
[NC] — case insensitive
[NE] — no escape

What is a .htaccess File?

.htaccess is a per-directory configuration file used by the Apache web server. Placed in a folder, it applies its rules to that folder and everything beneath it, letting you change server behaviour without touching the main server config or restarting Apache. It is commonly used for URL rewriting, redirects, access control, custom error pages and caching headers. The leading dot makes it a hidden file on Unix systems, which is why it often does not appear in FTP clients by default.

How mod_rewrite Rules Are Evaluated

Rewriting is handled by mod_rewrite. A RewriteRule has a pattern, a substitution and optional flags. Patterns are regular expressions matched against the URL path with the leading slash removed. Any RewriteCond lines directly above a rule act as conditions on it, and by default multiple conditions are combined with AND. Rules run in order, top to bottom, and the output of one rule becomes the input to the next unless you stop the chain. The most common flags are [L] to stop processing further rules, [R=301] for a permanent redirect, [NC] for case-insensitive matching and [QSA] to preserve the existing query string.

Common Mistakes Worth Avoiding

Redirect loops are the classic failure, usually caused by a rule that rewrites a URL into something that matches the same rule again — guard against it with a RewriteCond that excludes the target. Testing with R=301 too early is another trap, because browsers cache permanent redirects aggressively; use R=302 while iterating and switch to 301 once the rule is proven. Also remember that .htaccess is read on every single request, so very large rule sets carry a real performance cost. If you control the main server config, rules placed there are faster. Finally, .htaccess only works if AllowOverride permits it — on some hosts it is disabled entirely and your file will be silently ignored.

Frequently Asked Questions

Why is my .htaccess file being ignored?+
The most common reason is that AllowOverride is set to None for that directory in the Apache configuration, which disables .htaccess entirely. Other causes include the file being named incorrectly (it must be exactly .htaccess with no extension), wrong file permissions, or the site running on Nginx, which does not use .htaccess at all.
What is the difference between a 301 and a 302 redirect?+
A 301 is permanent and tells search engines to transfer ranking signals to the new URL and update their index. A 302 is temporary and leaves the original URL indexed. Browsers cache 301 responses aggressively, so use 302 while testing and only switch to 301 once you are certain the destination is correct.
What does the [L] flag actually do?+
It stops mod_rewrite from processing any further rules for the current pass. It does not necessarily end all rewriting, because in .htaccess context the rewritten URL can be fed back through the ruleset again. This is why a rule with [L] can still cause a loop if the result matches the same pattern.
Does .htaccess work on Nginx?+
No. .htaccess is an Apache feature. Nginx has no per-directory configuration equivalent, and its rewrite rules use different syntax defined in the server configuration. Rules must be converted manually and the server reloaded for changes to take effect.
Will a large .htaccess file slow down my site?+
It can. Apache reads and parses .htaccess on every request, and for every parent directory in the path. A handful of rules is negligible, but hundreds of rules add measurable latency. If you have access to the main server configuration, moving rules there removes the per-request parsing cost.
Done!