• Resolved CrazySerb

    (@crazyserb)


    Ok, so the Root URLs in WordPress are set to HTTPS.

    For some reason, the minute I add Litespeed Cache optimizations into .htaccess file, try and access the domain at HTTP (which would usually forward to HTTPS and get enforced by WordPress itself) Wordfence throws 403 errors in Edge browser showing an error on the screen and asking me to submit a report of it.

    I take out the Litespeed Cache code, voila, everything works just fine, and HTTP request gets properly forwarded to HTTPS.

    What in the world?!

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter CrazySerb

    (@crazyserb)

    And this is pretty much the code that breaks it all:

    # BEGIN LSCACHE
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    <IfModule LiteSpeed>
    RewriteEngine on
    CacheLookup on
    RewriteRule .* - [E=Cache-Control:no-autoflush]
    RewriteRule ^min/\w+\.(css|js) - [E=cache-control:no-vary]
    
    </IfModule>
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    # END LSCACHE
    # BEGIN NON_LSCACHE
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    ### marker MINIFY start ###
    <IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} ^(.*)/min/(\w+)\.(css|js)$
    RewriteCond %1/wp-content/cache/$2/$1.$2 -f
    RewriteRule min/(\w+)\.(css|js) wp-content/cache/$2/$1.$2 [L]
    </IfModule>
    ### marker MINIFY end ###
    
    ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
    # END NON_LSCACHE

    Hey @crazyserb,

    Is this only happening in the Edge browser?

    Can you please share a screenshot of the error you receive?

    Can you also share your the full contents of your .htaccess file?

    Thanks,

    Gerroald

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Throwing 403 Error on EDGE with Litespeed Cache?!’ is closed to new replies.