Rewrite Rules
What are Rewrite Rules?
How Rewrite Rules Work
Position-Based Evaluation
Request: /old-path
↓
Rewrite Rule (Position 1) → Match /old-path? → Rewrite to /new-path → STOP
↓ (no match)
Rewrite Rule (Position 2) → Match? → Rewrite → STOP
↓ (no match)
Continue to Page Rules with original or rewritten URL...URL Matching
Matchers
URL vs URI
When to Use Rewrite Rules
Use Rewrite Rules When:
Use Cases & Examples
Example 1: Legacy URL Support
Example 2: Clean URL Structure
Example 3: Platform Migration
Target Path
Rule Order Best Practices
1. Most Specific First
2. Exact Matches Before Patterns
3. Consider Downstream Rules
4. Consolidate Similar Patterns
Uniqueness
Common Mistakes
Testing Rewrite Rules
Last updated
Was this helpful?