1 مرفق
إنجن إكس Nginx الغاء الكاش لملفات محددة Disable Caching in the .htaccess
إنجن إكس Nginx الغاء الكاش لملفات محددة Disable Caching in the .htaccess
How to Disable Caching in the .htaccess File - htaccess exclude NGINX cache
Ignore or Exclude specific files or complete folder in NGINX - Nginx, turn off cache for a specific file
cpanel how to Ignore folder in NGINX - Ignore folder in NGINX - exclude file in NGINX
Exclude directory from nginx cache - How To Disable NGINX Cache
How to turn off caching using .htaccess - NGINX, Disable cache in specific folder for a specific file type
- Disable caching when serving static files with Nginx - Exclude a page from server caching
https://www.rise.company/forum/image...2021/12/14.png
المشكلة :
إنجن إكس Nginx يقوم بعمل انشاء لجميع الملفات ولكن هناك بعض الملفات التى تريد
ان يتم عمل استثناء لها حتى تعمل بشكل صحيح مثلا: ملفات تقدم قيم متغيرة باستمرار
هتتوقف اذا كان الكاش يعمل ويعطى نتائج غير محدثة.
حل المشكلة :
وضع ملف htaccess فى المجلد المطلوب وقف الكاش به
بداخل htaccess كود يمنع الكاش.
استخدم كود الغاء الكاش كاملا
وتم ارفاقه فى المرفقات جاهز
كود:
# DISABLE CACHING
<IfModule mod_headers.c>
Header set Cache-Control "no-cache, no-store, must-revalidate"
Header set Pragma "no-cache"
Header set Expires 0
</IfModule>
او استخدم كود الغاء الكاش لصيغ محدده
كود:
<FilesMatch "\.(css|flv|gif|htm|html|ico|jpe|jpeg|jpg|js|mp3|mp4|png|pdf|swf|txt)$">
<IfModule mod_expires.c>
ExpiresActive Off
</IfModule>
<IfModule mod_headers.c>
FileETag None
Header unset ETag
Header unset Pragma
Header unset Cache-Control
Header unset Last-Modified
Header set Pragma "no-cache"
Header set Cache-Control "max-age=0, no-cache, no-store, must-revalidate"
Header set Expires "Thu, 1 Jan 1970 00:00:00 GMT"
</IfModule>
</FilesMatch>
شاهد ايضا
سكريبت Whmcs حل مشكلة توقف server status عند قيم معينة كل فترة
المرجع:
https://www.a2hosting.com/kb/develop...using-htaccess
https://www.inmotionhosting.com/supp...sable-caching/
https://trinitytuts.com/tips/ignore-...-folder-nginx/