Skip to content
ZeroServer.tools

.htaccess Tester

Test Apache RewriteRule and RewriteCond directives against a URL. See which rule fires first.

Note: %{HTTPS}, %{REQUEST_FILENAME} conditions are simulated (assumes HTTP, non-existent files)

Line 9
RewriteRule ^(.*)/$ /$1
301
/old-page
RewriteCond %{REQUEST_FILENAME} !-d
L — last rule, stops processingR=301 — external redirect

How Apache mod_rewrite works

Apache's mod_rewrite processes RewriteRule directives in order. Each rule matches a URL path pattern (regex), optionally preceded by RewriteCond conditions. The [L] flag stops processing after a match.[R=301] issues an external redirect.[NC] makes the pattern case-insensitive. Rules without conditions always apply; with conditions, all conds must match first.

Private & free — this tool runs entirely in your browser.

Recommended: Namecheap Register a domain for your next project — from $1.98/yr.affiliate

Related Web & SEO tools