Skip to content
Accessibility
Theme
Text size
High contrast
Limit animations
Readable fontAtkinson Hyperlegible
Increased text spacing
Underline links
Always show focus

Runs in your browser — nothing you paste is uploaded.

.htaccess Redirect Tester

Paste your Apache rewrite/redirect rules and a test path to see where a request lands and with what status. Supports RewriteRule, Redirect and RedirectMatch. Runs in your browser.

Enter the request path (e.g. /blog/hello-world).


    

What it does

It applies your rules to the test path from top to bottom, the way Apache's mod_rewrite and mod_alias walk a file: each RewriteRule pattern is matched against the path (minus its leading slash), Redirect matches by URL prefix, and RedirectMatch matches by regex. You see where the request finally lands, the HTTP status, and a step-by-step log of which rules fired — so you can tell an external redirect from an internal rewrite at a glance.

A worked example

Given RewriteRule ^blog/(.*)$ /articles/$1 [L] and the test path /blog/hello-world, the pattern captures hello-world, the $1 back-reference drops it into the target, and the result is an internal rewrite to /articles/hello-world — no status code, because the browser URL does not change. Add R=301 to the flags and the same rule instead reports HTTP 301 /articles/hello-world, a permanent redirect the browser would follow. A bare Redirect 301 /legacy /modern matches any path starting with /legacy and carries the remainder across, so /legacy/page becomes /modern/page.

Supported

Regex patterns with $1…$9 back-references, the R (with optional status, e.g. R=301), L and NC flags, the - “no substitution” target, prefix-based Redirect (numeric or named statuses like permanent), and regex RedirectMatch. RewriteEngine and RewriteBase lines are ignored as harmless.

Limitations

RewriteCond conditions — host, query string, %{HTTPS}, file-existence checks and the like — are skipped, and the result flags when that happened. Those conditions routinely change real behaviour, as do rule ordering across multiple .htaccess files and server-level config, so treat this as a sanity check on your rule logic and back-references, not a full mod_rewrite engine. Always confirm on a staging server before shipping.

Related

Protecting a directory with Basic Auth? Generate credentials with the .htpasswd Generator. For WordPress-specific rules see the WordPress .htaccess tool, and to dissect a URL's parts use the URL Parser or build patterns with the Regex Tester.

Privacy

Everything runs in your browser; your rules and test paths are never uploaded.

Frequently asked questions

Does this fully emulate mod_rewrite?

No. It applies RewriteRule, Redirect and RedirectMatch with common flags but skips RewriteCond conditions (host, query string, file checks). Treat it as a rule-logic sanity check, not a replacement for testing on a server.

Which flags are supported?

R (with a status code), L and NC on RewriteRule, plus status codes on Redirect and RedirectMatch.

Related tools