.htaccess Compatibility
Learning Focus
By the end of this lesson you will know which Apache rewrite directives work in OpenLiteSpeed.
Supported Directives
| Directive | Support | Notes |
|---|---|---|
RewriteEngine | ✅ Full | Core rewrite support |
RewriteRule | ✅ Full | Pattern matching and substitution |
RewriteCond | ✅ Full | Conditional matching |
RewriteBase | ✅ Full | Base URL for relative rewrites |
Redirect | ✅ Full | Simple redirects |
RedirectMatch | ✅ Full | Regex-based redirects |
ErrorDocument | ✅ Full | Custom error pages |
Unsupported or Partial
Some Apache-specific modules are not available:
mod_substitutefor content rewriting- Complex
mod_rewritemap files - Certain
mod_proxydirectives (use OLS contexts instead)
Best Practices
- Test rewrite rules after migrating from Apache
- Use WebAdmin rewrite logging to debug rules that don't work
- Prefer native OLS configuration for server-managed rules
See .htaccess Support for the complete compatibility reference.
Key Takeaways
- OpenLiteSpeed supports most common Apache rewrite directives.
- Always test after migrating from Apache — some edge cases may differ.
- Native OLS configuration is more efficient for server-managed rules.
What's Next
- Return to the Advanced Features module for the complete overview.