• Resolved oftb

    (@oftb)


    Hello,

    I installed this cache plugin on a shared litespeed hosting server and it really reduced my TTFB. Thank you.

    I also use it with Cloudflare. I minimize css using the plugin and use Cloudflare for JS as suggested by a blog post.

    Posts and woocommerce product pages and archives load fine. All pages won’t load and give a 404 all of a sudden. The page posts are still all fine in the database. Creating a new page to test still results in 404.

    I have deleted the .htaccess file and regenerated it by saving permalink settings twice and more. None of these made a difference. Only pages are not loading.

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Support qtwrk

    (@qtwrk)

    Hi,

    when you regenerate .htaccess, do you see wordpress rule in it ?

    and basically , all your static files , works , but dynamic pages that rely on rewrite rule doesn’t work ?

    Best regards,

    Thread Starter oftb

    (@oftb)

    I am not too sure which ones are static vs dynamic.
    Posts and product pages and archives are OK.
    Pages (e.g. terms of use, about-us) are giving me 404.

    Here’s my regenerated .htaccess

    # 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 \.object-cache\.ini – [F,L]

    ### marker MOBILE start ###
    RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
    RewriteRule .* – [E=Cache-Control:vary=ismobile]
    ### marker MOBILE end ###

    ### marker CACHE RESOURCE start ###
    RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php – [E=cache-control:max-age=3600]
    ### marker CACHE RESOURCE end ###

    ### marker FAVICON start ###
    RewriteRule favicon\.ico$ – [E=cache-control:max-age=86400]
    ### marker FAVICON end ###

    ### marker DROPQS start ###
    CacheKeyModify -qs:fbclid
    CacheKeyModify -qs:gclid
    CacheKeyModify -qs:utm*
    CacheKeyModify -qs:_ga
    ### marker DROPQS end ###

    </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! ##
    ## LITESPEED WP CACHE PLUGIN – Do not edit the contents of this block! ##
    # END NON_LSCACHE

    # BEGIN WordPress
    # The directives (lines) between “BEGIN WordPress” and “END WordPress” are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    <IfModule mod_expires.c>

    # Enable expirations
    ExpiresActive On
    # My favicon
    ExpiresByType image/x-icon “access plus 1 year”
    # Images
    ExpiresByType image/gif “access plus 1 month”
    ExpiresByType image/png “access plus 1 month”
    ExpiresByType image/jpg “access plus 1 month”
    ExpiresByType image/jpeg “access plus 1 month”
    ExpiresByType image/svg+xml “access plus 1 month”
    # CSS
    ExpiresByType text/css “access plus 1 month”
    # Javascript
    ExpiresByType application/javascript “access plus 1 year”
    </IfModule>

    # MediaAce Rules – Hotlink protection
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_URI} !/wp-content/plugins/media-ace/assets/hotlink-placeholder.png$
    RewriteCond %{HTTP_REFERER} !^$
    RewriteCond %{HTTP_REFERER} !^(http(s)?://)?(www\.)?aaaaa.com [NC]
    RewriteCond %{HTTP_REFERER} !^(http(s)?://)?(www\.)?facebook\.com [NC]
    RewriteCond %{HTTP_REFERER} !^(http(s)?://)?(www\.)?google\.*$/.* [NC]
    RewriteCond %{HTTP_REFERER} !^(http(s)?://)?(www\.)?pinterest\.*$/.* [NC]
    RewriteRule .*\.(jpg|jpeg|png|gif)$ https://aaaaa.com/wp-content/plugins/media-ace/assets/hotlink-placeholder.png [NC,R,L]
    </IfModule>

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    # END WordPress

    # Wordfence WAF
    <IfModule LiteSpeed>
    php_value auto_prepend_file ‘/home/aaaaa.com/wordfence-waf.php’
    </IfModule>
    <IfModule lsapi_module>
    php_value auto_prepend_file ‘/home/aaaaaa.com/wordfence-waf.php’
    </IfModule>
    <Files “.user.ini”>
    <IfModule mod_authz_core.c>
    Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
    Order deny,allow
    Deny from all
    </IfModule>
    </Files>

    # END Wordfence WAF

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    please try 2 things

    1. if you disable litespeed cache , does it work ?

    2. remove all rules , only keep this block

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule .* – [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    RewriteBase /
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>

    see how it goes

    Best regards,

    Thread Starter oftb

    (@oftb)

    Tried both, didn’t make a difference…..
    Could you please tell me other things to check?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    Then it seems the issue is not related to cache plugin.

    All in all, next step I would like to suggest you to contact your hosting provider, they should be able to check server log to find out why it gives 404

    Best regards,

    • This reply was modified 4 years, 1 month ago by qtwrk.
    Plugin Support qtwrk

    (@qtwrk)

    By the way, if you set plain text in permalink, did it work?

    Plugin Support qtwrk

    (@qtwrk)

    Hi,

    I’m going to mark this topic “Resolved”, due to lack of activity.

    If you still need help, please feel free to re-open it.

    When re-open it, please also change the topic status to “not solved”

    Best regards,

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘404 on pages only’ is closed to new replies.