Forked from lukapaunovic/Disable cart fragments for homepage via .htaccess woocommerce
Created
October 19, 2018 11:52
-
-
Save sooryakiransv/fdad43306bc94a6f0ba04e7c52a9fe56 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] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment