.htaccess Tester
Test Apache rewrite rules (RewriteRule, RewriteCond, Redirect) against a URL and see which rules match and where the request ends up. How it Works
Like Apache
mod_rewrite, then mod_alias, then another pass after each internal rewrite, line by line.
The Request
Method, user agent, headers, and the files that exist, for conditions that test them.
Shareable
Copy a link that carries the rules, URL and request, to discuss a case.
A Real Example
Checked 17 November 2026https://example.com/about
RewriteEngine On RewriteRule ^(.*)$ /public/$1 [L]
- What the tool found
- Rewrite loop. Each pass adds /public/ again (/public/about, then /public/public/about), because [L] ends only the current pass and Apache runs the file again for the new URL. After 10 internal redirects LimitInternalRecursion stops it, and the request ends with HTTP 500.
- What to do
- Add RewriteCond %{REQUEST_URI} !^/public/ above the rule, or use [END] instead of [L]. Either way the tester serves /public/about after one rewrite.
Reading the Result
Redirects
An [R] flag or a Redirect directive matched, and the browser is sent to the final URL with that status. Use 301 or 308 for moves you mean to keep: Google reads them as a strong sign the new URL is the one to show.
Rewritten
An internal rewrite: the address in the browser stays the same and the server answers from the final URL. Search engines only ever see the original URL.
Forbidden, Gone or Rewrite Loop
[F] ends the request with 403 and [G] with 410. A loop is a rewrite that keeps matching its own output, which Apache stops after 10 passes with a 500.
Met, Not Met, Not Reached, Ignored
How each line fared in each pass. Not reached means an earlier rule ended the pass; ignored means a directive the tester doesn't evaluate. Start reading at the first line that isn't what you expected.
What it Can't Tell You
- It sees only the rules you paste. Rules in the server config or in other .htaccess files, and modules other than mod_rewrite and mod_alias, can change the outcome. <If>, <Files> and <Directory> blocks aren't evaluated: the directives inside are tested as if the block applied.
- Files and folders exist only if you list them, so -f and -d conditions answer from your list, not your server.