[شرح] تسريع المنتدى 900% طريقه مضمونه مجربه

ishaq998

عضو جديد
19 أغسطس 2010
172
0
0
www.al-fares.net
هيدا الكود كامل كل ماعليك هو فقط وضعه بأخر ملف ال .htaccess لديك​



PHP:
# Turn on Expires and set default to 0 
ExpiresActive On 
ExpiresDefault A0 
 
# Set up caching on media files for 1 year (forever?) 
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> 
ExpiresDefault A29030400 
Header append Cache-Control "public" 
</FilesMatch> 
 
# Set up caching on media files for 1 week 
<FilesMatch "\.(gif|jpg|jpeg|png|swf)$"> 
ExpiresDefault A604800 
Header append Cache-Control "public" 
</FilesMatch> 
 
# Set up 2 Hour caching on commonly updated files 
<FilesMatch "\.(xml|txt|html|js|css)$"> 
ExpiresDefault A7200 
Header append Cache-Control "proxy-revalidate" 
</FilesMatch> 
 
# Force no caching for dynamic files 
<FilesMatch "\.(php|cgi|pl|htm)$"> 
ExpiresActive Off 
 
[IMG]http://cdn5.tribalfusion.com/media/37536.gif[/IMG]Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" 
Header set Pragma "no-cache" 
</FilesMatch>



مهم : الكود يعمل على كل المواقع والسكربتات وليس فقط المنتديات



ولي عنده اي سؤال انا حاظر
سوف اضع شرح مصور كيفية التركيب قريباً
 

essaber4

عضو جديد
27 مايو 2010
266
2
0
www.ahlsahra.com
PHP:
[IMG]http://cdn5.tribalfusion.com/media/37536.gif[/IMG]Header set Cache-Control "private, no-cache, no-store, proxy-revalidate, no-transform" 
Header set Pragma "no-cache" 
</FilesMatch>

ما هذا يارجل
رغم انني لست خبيرا
الا انني اظن ان مثل هذا الامر سيجعل صفحة المنتدى بيضاء
هل يمكنك شرح ذلك

هذا هو الكود الصحيح بعد حذف العبارة السابقة التي ذكرت
PHP:
# Turn on Expires and set default to 0
ExpiresActive On
ExpiresDefault A0
 
# Set up caching on media files for 1 year (forever?)
<FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$">
ExpiresDefault A29030400
</FilesMatch>
 
# Set up caching on media files for 1 week
<FilesMatch "\.(gif|jpg|jpeg|png|swf)$">
ExpiresDefault A604800
</FilesMatch>
 
# Set up 2 Hour caching on commonly updated files
<FilesMatch "\.(xml|txt|html|js|css)$">
ExpiresDefault A7200
</FilesMatch>
 
# Force no caching for dynamic files
<FilesMatch "\.(php|cgi|pl|htm)$">
ExpiresActive Off
</FilesMatch>
 

essaber4

عضو جديد
27 مايو 2010
266
2
0
www.ahlsahra.com
احذروا
هاهو الكود الصحيح

PHP:
# Turn on Expires and   set default to 0 
ExpiresActive On 
ExpiresDefault A0 
  
# Set up caching on media files for 1 year   (forever?) 
<FilesMatch   "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav)$"> 
ExpiresDefault A29030400 
Header append Cache-Control "public" 
</FilesMatch> 
  
# Set up caching on media files for 1 week 
<FilesMatch   "\.(gif|jpg|jpeg|png|swf)$"> 
ExpiresDefault A604800 
Header append Cache-Control "public" 
</FilesMatch> 
  
# Set up 2 Hour caching on commonly updated   files 
<FilesMatch   "\.(xml|txt|html|js|css)$"> 
ExpiresDefault A7200 
Header append Cache-Control "proxy-revalidate" 
</FilesMatch> 
  
# Force no caching for dynamic files 
<FilesMatch   "\.(php|cgi|pl|htm)$"> 
ExpiresActive Off 
Header set Cache-Control "private, no-cache,   no-store, proxy-revalidate, no-transform" 
Header set Pragma "no-cache" 
</FilesMatch>