Skip to main content

.htaccess Compatibility

Learning Focus

By the end of this lesson you will know which Apache rewrite directives work in OpenLiteSpeed.

Supported Directives

DirectiveSupportNotes
RewriteEngine✅ FullCore rewrite support
RewriteRule✅ FullPattern matching and substitution
RewriteCond✅ FullConditional matching
RewriteBase✅ FullBase URL for relative rewrites
Redirect✅ FullSimple redirects
RedirectMatch✅ FullRegex-based redirects
ErrorDocument✅ FullCustom error pages

Unsupported or Partial

Some Apache-specific modules are not available:

  • mod_substitute for content rewriting
  • Complex mod_rewrite map files
  • Certain mod_proxy directives (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