I'm using CyberPanelthat it work with litespeed, I want to use .htaccess but it seems not reading any command in htaccess. for example I set:

Deny from all

But it not affacted. here is vHost conf:

rewrite  {
  enable                  1
  autoLoadHtaccess        1

Because OLS only supports




any other directive will be ignored and dropped.

if you want to do access control , you can use RewriteRule to do so


RewriteRule .* - [F]  

deny access to all

RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteRule .* - [F,L]

allow access for certain IP

You can further customize it to make a deny/allow equivalent

more detail here

  • Although the OP references "LiteSpeed", not "OpenLiteSpeed"? LiteSpeed does support the access control directive Deny from all. – MrWhite Jul 1 '20 at 15:09
  • 1
    Yes, LiteSpeed Enterprise does fully support directive like Deny , but he posted a conf rewrite { enable 1 autoLoadHtaccess 1 } , this is only to OLS. – qtwrk Jul 1 '20 at 16:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.