- Free tools
- htaccess Tester
FREE SECURITY TOOL
htaccess rewrite tester
Test your Apache mod_rewrite rules against a URL before you deploy them. Paste your RewriteRule and RewriteCond lines, enter a request URL, and see the match, the result and the status code. Runs in your browser.
- RewriteRule and RewriteCond
- Redirect status shown
- Nothing uploaded
Rules and request
Simulates the common RewriteRule, RewriteCond, Redirect and RedirectMatch directives. Complex conditions like REQUEST_FILENAME checks are treated as passing.
Result
Enter rules and a URL, then click Test.
HOW IT WORKS
Test a rewrite in three steps
A wrong rewrite can redirect loop, break pages or leak the wrong status to Google. Testing a URL against your rules first catches those before they reach production.
Paste your rules
Copy the RewriteCond and RewriteRule lines from your .htaccess or server config.
Enter a URL
Give a full URL or a path. Set the scheme so HTTPS conditions evaluate the way they will on the server.
Read the outcome
See which rule matched, the resulting URL, the HTTP status, and a step-by-step trace of the rewrite.
WHAT IT UNDERSTANDS
The directives and flags it simulates
The tester covers the rules most sites actually use for redirects and clean URLs. It applies them in order, honoring the flags that change the outcome or stop processing.
| Directive or flag | Behavior |
|---|---|
| RewriteRule | Matches the pattern against the path and applies the substitution with $1 backreferences |
| RewriteCond | HTTP_HOST, HTTPS, REQUEST_URI and QUERY_STRING conditions, with NC and OR |
| R=301, R=302 | Marks the result as a redirect with that status; R alone is 302 |
| L, END | Stops further rule processing |
| F / G | Returns 403 Forbidden or 410 Gone |
| NC, QSA | Case-insensitive matching, and appending the original query string |
| Redirect, RedirectMatch | Simple mod_alias redirects with an optional status code |
WHAT YOU GET
A clear, honest simulation
Step by step
See every rule evaluated, which matched, which were skipped, and why, so you can debug the exact line.
Right status code
Distinguishes an internal rewrite (200) from a 301 or 302 redirect, 403 and 410, the way search engines see it.
Loop detection
Runs multiple passes like mod_rewrite and stops if the rules would loop, flagging the risk.
Scheme and host
Set http or https so your force-HTTPS and canonical-host conditions behave as they will live.
Clear limits
It tells you plainly which advanced conditions it cannot evaluate, rather than guessing silently.
Nothing uploaded
Your rules are tested in your browser. No account, no logging, no server round trip.
ONE RULE VS YOUR WHOLE SITE
Test a rule here. Verify redirects live with SiteAuditLint.
This tester simulates rules offline. The desktop app follows your real redirects across the site and flags chains, loops and wrong status codes.
| Task | This free tool | SiteAuditLint app |
|---|---|---|
| Simulate a rewrite rule against a URL | Yes | Not needed |
| Follow real redirects across a site | No | Yes |
| Flag redirect chains and loops live | No | Yes |
| Check status codes on every URL | No | Yes |
Generating redirects from scratch? Try the redirect rule generator.
FAQ
htaccess tester questions
What does this htaccess tester do?
It simulates Apache mod_rewrite against a URL you provide, applying your RewriteCond and RewriteRule lines in order and showing the final URL and HTTP status. It is a safe way to check rules before deploying them.
Is it a full mod_rewrite implementation?
No. It covers the common directives and flags most sites use, including RewriteRule, RewriteCond on HTTP_HOST, HTTPS, REQUEST_URI and QUERY_STRING, the R, L, NC, QSA, F and G flags, and simple Redirect and RedirectMatch. Advanced filesystem conditions are treated as passing.
Why does my HTTPS redirect not trigger?
Set the scheme selector to http so the %{HTTPS} off condition matches. The tester cannot know the real scheme from a path alone, so you tell it what the incoming request used.
How do I read the status code?
200 means an internal rewrite that keeps the URL in the browser. 301 and 302 are redirects the browser follows. 403 is Forbidden from an F flag, and 410 is Gone from a G flag.
Does it detect redirect loops?
Yes. It runs several passes like the server does and stops if the output keeps changing, warning you that the rules may loop. Loops are a common cause of too many redirects errors.
Can I test rules from Nginx or IIS?
This tool targets Apache mod_rewrite and mod_alias syntax. Nginx and IIS use different rewrite formats, so translate them to Apache syntax first or test them on a staging server.
Is this htaccess tester free?
Yes, free with no signup, and it runs entirely in your browser. It is part of a set of free developer and SEO tools from SiteAuditLint.
Test one rule here. Verify every redirect with SiteAuditLint.
Rewrite mistakes create loops and wrong status codes that quietly hurt SEO. The free desktop crawler follows your real redirects across the whole site.
Download SiteAuditLint