Creative Workflow Helpers

Apache Rewrite Tester

Paste mod_rewrite rules, give a sample request path, and see exactly which rule matches, what it rewrites to, and where redirects land — without touching a server.

Server PHP engine + browser engine v1.0.0

Rewrite rules

mod_rewrite

One directive per line: RewriteEngine, RewriteBase, RewriteCond, RewriteRule. Lines starting with # are comments.

A path like /products/42?ref=email, or a full URL to test the host and scheme.

Advanced request options

.htaccess strips the leading slash before matching.

Used to resolve relative substitutions.

Used when the sample is a path with no host.

Result

Server-rendered preview
Internal rewrite

Line 5 matched. The server serves the rewritten path; the browser URL stays the same.

Final URL

http://example.com/index.php?utm_source=news

Step-by-step trace

RewriteRule ^(.*)$ index.php [L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

How it works

Two implementations of the same mod_rewrite engine power this page. PHP evaluates your rules on the server for the first rendered result; a JavaScript port then recomputes every keystroke in your browser. Your rules and sample URL stay on this page — they are never uploaded or sent anywhere. File-system tests such as %{REQUEST_FILENAME} !-f cannot be answered outside a real server, so they are treated as “not found” and flagged.