Support » Plugin: W3 Total Cache » 404 error caused by redirection to _index_ssl.html

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    As per Woocomernce recommendation, you need to exclude certain pages from being cached.
    I.E.
    Go to performance>Page cache and scroll down to Advanced sub-box. Type in the pages you need to exclude from cache in “Never cache the following pages: ”
    /products/
    /cart/
    /account/
    Also, make sure to check Woocommerce documentation https://docs.woocommerce.com/document/configuring-caching-plugins/

    Thread Starter nothin7

    (@nothin7)

    Hi. I have read the documentation. Where does WooCommerce recommend not caching product pages?

    What’s the point in using a caching plugin on an e-commerce site if you can’t cache product pages (99% of the site)?

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,
    If you disable “Cache SSL (HTTPS) requests” does the issue persists?

    Thread Starter nothin7

    (@nothin7)

    Interesting. Disabling “Cache SSL (HTTPS) requests” seems to fix the issue. What does that tell us? Given that all of my pages are served over HTTPS, am I losing any performance?

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,
    As you can see in the description “Cache SSL requests (uniquely) for improved performance.” so no you are not losing performance.

    Thread Starter nothin7

    (@nothin7)

    I don’t understand your point. The description “for improved performance” indicates this option improves performance.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    Have you run some tests on your website to see if there is a change in performance when “Cache SSL requests (uniquely) for improved performance.” setting is enabled/disabled?

    Thread Starter nothin7

    (@nothin7)

    I have not. I was hoping for some clarity from the plugin author regarding what this option means and why I might want to use it.

    Thread Starter nothin7

    (@nothin7)

    Thanks for your quick replies.

    Unfortunately, the original problem is back, even with “Cache SSL (HTTPS) requests” still unchecked. Now the URL to which I am redirected is:

    https://www.alternativeradio.org/products/farl001/_index.html_gzip/

    Presumably I’d be redirected to https://www.alternativeradio.org/products/farl001/_index.html/ if compression were disabled.

    What’s going on here? (Currently Page Cache is disabled again because this is a live site.)

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    Thanks for your feedback. If your website uses https, you should enable that option
    It should not cause 404 pages, only allow the plug-in to cache https requests.
    Can you please share your .htaccess file if convenient so we can check this?

    Thread Starter nothin7

    (@nothin7)

    Thank you for pointing me in the right direction! Looks like the following line was the problem:

    RedirectMatch 301 /(.*)/products/(.*) /products/$2/

    How can I keep this rule while using W3TC? I need to ensure the URLs like the following redirect to this page:

    https://www.alternativeradio.org/collections/latest-programs/products/farl001/

    This was a pattern Shopify used, and I cannot always predict what the collections/latest-programs part in the middle will be. What I can predict is that it will end in /products/farl001/, or /products/jamd004/, or more generally: /products/[productSKU]

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello,

    Is that line before or after W3TC rules?

    Thread Starter nothin7

    (@nothin7)

    It fails whether it is before or after. I prefer it before.

    Plugin Support Marko Vasiljevic

    (@vmarko)

    Hello @nothin7,
    Sorry for the late reply.
    The problem is your redirect. Please add the code below:

    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)/products/(.*)/?$ /products/$2/ [L,R=301]
    </IfModule>

    Basically what the difference is, is that this rewrite checks if the requested URL is linking to a file. If it doesn’t, redirect the URL.

    Thread Starter nothin7

    (@nothin7)

    Thank you!!

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘404 error caused by redirection to _index_ssl.html’ is closed to new replies.