Exception for some pages in litespeed cache in .htaccess - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Friday, February 25, 2022

Exception for some pages in litespeed cache in .htaccess

im using of these codes , but right now i need a code for deleting (resetting) old cache or make exception for this page : test.com/50505/pageurl.php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobile]

RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php) [NC]
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in|woocommerce_items_in_cart|edd) [NC]
RewriteCond %{REQUEST_URI} !\.(jpg|gif|jpeg|png|css|ico|js|swf|zip|rar|mp3|exe|ttf|woff|tff) [NC]
RewriteRule ^$ - [L,E=Cache-Control:max-age=400]

RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php) [NC]
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in|woocommerce_items_in_cart|edd) [NC]
RewriteCond %{REQUEST_URI} !\.(jpg|gif|jpeg|png|css|ico|js|swf|zip|rar|mp3|exe|woff|ttf) [NC]
RewriteRule ^(/)?$ - [L,E=Cache-Control:max-age=400]

RewriteCond %{REQUEST_URI} !(\/wp-admin\/|\/xmlrpc.php|\/wp-(app|cron|login|register|mail)\.php|wp-.*\.php) [NC]
RewriteCond %{HTTP_COOKIE} !(comment_author|wp-postpass|wordpress_\[a-f0-9\]\+|wordpress_logged_in|woocommerce_items_in_cart|edd) [NC]
RewriteCond %{REQUEST_URI} !\.(jpg|gif|jpeg|png|css|ico|js|swf|zip|rar|mp3|exe|woff|ttf) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !(order|checkout|cart)
RewriteRule . /index.php [L,E=Cache-Control:max-age=400]

RewriteCond %{REQUEST_URI} !\.(jpg|gif|jpeg|png|css|ico|js|swf|zip|rar|mp3|exe|woff|ttf) [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


source https://stackoverflow.com/questions/71256554/exception-for-some-pages-in-litespeed-cache-in-htaccess

No comments:

Post a Comment