Last active
December 6, 2019 07:14
-
-
Save lukapaunovic/8bb9240d999a1e933fd2d6bb6995d9fd to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Disable Woocommerce cart fragments for homepage via .htaccess | |
# By creating empty response | |
# Please replace yoursite.com | |
# Disable only on homepage | |
RewriteEngine On | |
RewriteCond %{HTTP_REFERER} ^https://yoursite.com/$ [NC] | |
RewriteCond %{QUERY_STRING} ^wc-ajax=get_refreshed_fragments$ | |
RewriteRule ^(.*)$ $1 [R=204,L] | |
# Disable everywhere | |
RewriteEngine On | |
RewriteCond %{QUERY_STRING} ^wc-ajax=get_refreshed_fragments$ | |
RewriteRule ^(.*)$ $1 [R=204,L] |
I used your settings all the time and it was great!
It doesn't work anymore. Could give new instructions ..?
My site
WooCommerce 3.8.1
WordPress 5.3
PHP 7.4
MySQL 5.7.16-10-log
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@jayeq, if you are using the method which uses 404.php file then you need to create that file, of course.
The content of the 404.php file should be:
Then in waterfall u should see 204 response instead of 500 error.