.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
→ /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
Meta Tag Generator
Build SEO title, description, and viewport meta tags.
Open Graph Generator
Generate Open Graph and Twitter Card meta tags.
Robots.txt Generator
Build a robots.txt file with per-bot rules. Block AI crawlers, set crawl delays, define sitemaps.
UTM Campaign URL Builder
Append UTM parameters to build trackable campaign URLs.
Hreflang Tag Generator
Generate hreflang link tags for multilingual SEO.
Sitemap XML Generator
Build an XML sitemap from a list of URLs.
SERP Snippet Preview
Preview how your page title and meta description appear in Google search.
Meta Tag Analyzer
Paste a page's HTML head to audit its title, meta, and social tags.