هاست لینوکس

آخرین بسته‌ی MyBB: نسخه‌ی 1.8.27 MyBB منتشر شد


امتیاز موضوع:
  • 0 رأی - میانگین امتیازات: 0
  • 1
  • 2
  • 3
  • 4
  • 5
مشکل با فایل HTACCESS
#1
بسم الله الرحمن الرحیم
سلام،دوستان من چند ماه کدهای زیر رو که مربوط به کش شدن تصاویر و .... در مرورگر میشن در فایل htaccess سایتم قرار دادم و هیچ مشکلی نداشتم اما اخیرا این کدها مشکل ساز شده و وقتی درون فایل htaccess باشه سایت ارور میده . کدهای مورد استفاده :

کد:
## EXPIRES CACHING ##
ExpiresActive On
ExpiresByType image/jpg “access 1 year”
ExpiresByType image/jpeg “access 1 year”
ExpiresByType image/gif “access 1 year”
ExpiresByType image/png “access 1 year”
ExpiresByType text/css “access 1 month”
ExpiresByType application/pdf “access 1 month”
ExpiresByType text/x-javascript “access 1 month”
ExpiresByType application/x-shockwave-flash “access 1 month”
ExpiresByType image/x-icon “access 1 year”
ExpiresDefault “access 2 days”
## EXPIRES CACHING ##

اروری که هنگام استفاده از کدها مشاهده میشه :

کد:
Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@happydays.ir and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

قبلا چندین ماه از این کدها استفاده کردم و هیچ مشکلی نبود اما اخیرا این مشکل به وجود اومده که فقط با برداشتن این کدها از HTACCESS حل میشه .
اخیرا نسخه مای بی بی رو از 1.6.11 به 1.6.12 ارتقا دادم و plugin library رو به نسخه 12 ارتقا دادم .
دوستان اگه ممکنه راهنمایی کنید
آیا افزونه ای برای کش کردن تصاویر وجود داره ؟
چکار باید بکنم ؟
پاسخ
 سپاس شده توسطfirstboy000 (۱۳۹۳/۱/۲۵، ۱۴:۳۳:۴۵ عصر)
#2
افزونه ها کار خاصی نمیکنن.اونا هم دراصل میان این کد رو استفاده میکنن.
جی زیپ رو هم فعال کنید.

و باید بگم که این کدا سالمه و من خودم دارم استفاده میکنمو دچار چنین چیزی نشدم.این ارور ناشی از سرور میشه اگر اشتباه نکنم.حالا یا ضعیف شده یا فشار روشه.


باز هم من چیزی نمیدونمو از دوستان درخواست میکنم راهنمایی کنن.Heart
نصب و آپدیت انجمن مای بی بی | پلاگین و پوسته | تغییرات داخلی انجمن
نصب و بروزرسانی وردپرس طراحی پوسته های وردپرسی سبک با سئوی بالا
شخصی سازی پوسته های مای بی بی و وردپرس
طراحی سیستم مدیریت محتوای اختصاصی و خاص با برترین زبان های برنامه نویسی دنیا
جهت سفارش در تلگرام: firstboy000@
پاسخ
 سپاس شده توسطصالح غلامیان (۱۳۹۳/۱/۲۵، ۱۵:۰۹:۵۳ عصر) ، navidahanj (۱۳۹۳/۱/۲۵، ۱۶:۳۸:۱۳ عصر) ، Gh-Moradi (۱۳۹۳/۱/۲۶، ۰۳:۴۷:۲۲ صبح)
#3
درود

کدها را سر جایشان قرار دهید سپس دونه دونه حذف کنید ببینید با جذف کدام یک مشکل برطرف میشه تا یکم تمرکز روی مشکل بیشتر بشه.
پاسخ
 سپاس شده توسطfirstboy000 (۱۳۹۳/۱/۲۵، ۱۵:۵۲:۵۲ عصر) ، navidahanj (۱۳۹۳/۱/۲۵، ۱۶:۳۸:۲۱ عصر) ، Gh-Moradi (۱۳۹۳/۱/۲۶، ۰۳:۴۷:۲۴ صبح)
#4
منم چند ماهی بدون مشکل از این کدها استفاده میکردم تا اینکه این مشکل به وجود اومد،به پشتیبانی که گفتم زیر بار نرفت و گفت مشکل از فایلتونه در حالی که این فایل رو ما چندین ماهه تغییر ندادیم .

چطور Gzip رو فعال کنم ؟ البته فکر کنم فعال باشه .

کدها رو یکی یکی تست کردم فقط با این کدها مشکلی نداشت :

کد:
## EXPIRES CACHING ##
ExpiresActive On
## EXPIRES CACHING ##

دوستان روش دیگه ای نیست که ما از این کدها استفاده کنیم ؟ واقعا بدون استفاده از این کدها سایت برای کاربران خیلی سنگین میشه .
انجمن روزهای شادی = http://www.happydays.ir

[تصویر:  1407544361.jpg]


[تصویر:  mohammad_za_sig.png]
پاسخ
#5
درود بر شما

این کد کاملترین و بهترین هست اینو تست کنید :

کد:
<IfModule mod_mime.c>
    AddType text/css .css
    AddType application/x-javascript .js
    AddType text/x-component .htc
    AddType text/html .html .htm
    AddType text/richtext .rtf .rtx
    AddType image/svg+xml .svg .svgz
    AddType text/plain .txt
    AddType text/xsd .xsd
    AddType text/xsl .xsl
    AddType text/xml .xml
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/vnd.ms-fontobject .eot
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/x-font-otf .otf
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType application/x-font-ttf .ttf .ttc
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A31536000
    ExpiresByType application/x-javascript A31536000
    ExpiresByType text/x-component A31536000
    ExpiresByType text/html A3600
    ExpiresByType text/richtext A3600
    ExpiresByType image/svg+xml A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xsd A3600
    ExpiresByType text/xsl A3600
    ExpiresByType text/xml A3600
    ExpiresByType video/asf A31536000
    ExpiresByType video/avi A31536000
    ExpiresByType image/bmp A31536000
    ExpiresByType application/java A31536000
    ExpiresByType video/divx A31536000
    ExpiresByType application/msword A31536000
    ExpiresByType application/vnd.ms-fontobject A31536000
    ExpiresByType application/x-msdownload A31536000
    ExpiresByType image/gif A31536000
    ExpiresByType application/x-gzip A31536000
    ExpiresByType image/x-icon A31536000
    ExpiresByType image/jpeg A31536000
    ExpiresByType application/vnd.ms-access A31536000
    ExpiresByType audio/midi A31536000
    ExpiresByType video/quicktime A31536000
    ExpiresByType audio/mpeg A31536000
    ExpiresByType video/mp4 A31536000
    ExpiresByType video/mpeg A31536000
    ExpiresByType application/vnd.ms-project A31536000
    ExpiresByType application/x-font-otf A31536000
    ExpiresByType application/vnd.oasis.opendocument.database A31536000
    ExpiresByType application/vnd.oasis.opendocument.chart A31536000
    ExpiresByType application/vnd.oasis.opendocument.formula A31536000
    ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
    ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
    ExpiresByType application/vnd.oasis.opendocument.text A31536000
    ExpiresByType audio/ogg A31536000
    ExpiresByType application/pdf A31536000
    ExpiresByType image/png A31536000
    ExpiresByType application/vnd.ms-powerpoint A31536000
    ExpiresByType audio/x-realaudio A31536000
    ExpiresByType image/svg+xml A31536000
    ExpiresByType application/x-shockwave-flash A31536000
    ExpiresByType application/x-tar A31536000
    ExpiresByType image/tiff A31536000
    ExpiresByType application/x-font-ttf A31536000
    ExpiresByType audio/wav A31536000
    ExpiresByType audio/wma A31536000
    ExpiresByType application/vnd.ms-write A31536000
    ExpiresByType application/vnd.ms-excel A31536000
    ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    </IfModule>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
    </IfModule>
</IfModule>
<FilesMatch "\.(css|js|htc|CSS|JS|HTC)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
</FilesMatch>
<FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|X​SL|XML)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|j​peg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg​|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|t​tc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIVX|D​OC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4|M4V​|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|PPTX|R​A|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
</FilesMatch>
پاسخ
 سپاس شده توسطnavidahanj (۱۳۹۳/۱/۲۵، ۱۹:۴۳:۰۹ عصر)
#6
مهدی جان کدی که قرار دادی عالی بود . مشکلم حل شد ممنون

مهدی جان این کد خوبه اما مشکل ورود و خروج رو بوجود اورده،فایل setting رو بررسی کردم و کاملا صحیح بود

در واقع کاربرها براحتی وارد و خارج می شوند اما در صفحه جور دیگری نمایش داده می شود یعنی مثلا من وارد انجمن شدم اما هنوز ازم میخواد لاگین کنم اما اگه صفحه رو به طور کامل reload کنم میبینم که اکانتم لاگین شده

برعکس این موضوع برای خارج شدن هم صدث میکنه،کش مرورگر رو هم پاک کردم اما مشکل حل نشد . فکر کتم این کدها باید ویرایش بشن .
انجمن روزهای شادی = http://www.happydays.ir

[تصویر:  1407544361.jpg]


[تصویر:  mohammad_za_sig.png]
پاسخ
#7
درود دگر بار

یه اکانت تست بدید بررسی کنم
پاسخ
 سپاس شده توسطصالح غلامیان (۱۳۹۳/۱/۲۵، ۲۱:۳۵:۱۰ عصر)
#8
درود به خاطر اینه که این کد همه چیز رو کش میکنه قبلا تو تاپیک مربوط بهش در مورد همین بحث شده.
در کل استفاده از این کدها چندان هم جالب نیست مشکل دیر لود شدن انجمن شما میتونه از قالب یا هاست باشه من پیشنهاد میکنم اونو پیگیری کنید
پاسخ
 سپاس شده توسطnavidahanj (۱۳۹۳/۱/۲۵، ۲۱:۴۱:۵۶ عصر)
#9
اکانت تست :

Testhappydays
123456789

اینم کل کدهای ما (کدهای شما در آخر قرار گرفته) :

کد:
# EXAMPLE .htaccess FOR MYBB WITH GOOGLE SEO URL
# -------------------------------------------------------------------
# This file is identical to MyBB's htaccess.txt example file,
# with rewrite rules for a standard Google SEO install added.
#
# Before using this file please make sure to:
#
#   - replace /MyBB/ with your forum folder, e.g. / or /forum/
#   - replace yoursite/MyBB with your forum URL
#   - name the file '.htaccess' (starting with the dot, no .txt)
#
# Alternatively you can add the required rewrite rules to your
# existing .htaccess, the specific rules required will be displayed
# on the plugin status page once Google SEO URL is enabled.
# -------------------------------------------------------------------

Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
    # Turn off mod_security filtering.
    SecFilterEngine Off

    # The below probably isn't needed, but better safe than sorry.
    SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
    RewriteEngine on

# Some hosts require RewriteBase to make RewriteRules work.
RewriteBase /

# Google SEO workaround for search.php highlights:
# Make this rule the first rewrite rule in your .htaccess!
RewriteRule ^([^&]*)&(.*)$ http://www.happydays.ir/$1?$2 [L,QSA,R=301]

# Google SEO 404:
ErrorDocument 404 /misc.php?google_seo_error=404

# Google SEO Sitemap:
RewriteRule ^sitemap\-([^./]+)\.xml$ misc.php?google_seo_sitemap=$1 [L,QSA,NC]

# Google SEO URL Forums:
RewriteRule ^Forum\-([^./]+)$ forumdisplay.php?google_seo_forum=$1 [L,QSA,NC]

# Google SEO URL Threads:
RewriteRule ^Thread\-([^./]+)$ showthread.php?google_seo_thread=$1 [L,QSA,NC]

# Google SEO URL Announcements:
RewriteRule ^Announcement\-([^./]+)$ announcements.php?google_seo_announcement=$1 [L,QSA,NC]

# Google SEO URL Users:
RewriteRule ^User\-([^./]+)$ member.php?action=profile&google_seo_user=$1 [L,QSA,NC]

# Google SEO URL Calendars:
RewriteRule ^Calendar\-([^./]+)$ calendar.php?google_seo_calendar=$1 [L,QSA,NC]

# Google SEO URL Events:
RewriteRule ^Event\-([^./]+)$ calendar.php?action=event&google_seo_event=$1 [L,QSA,NC]

    # Google SEO 404:
    ErrorDocument 404 /MyBB/misc.php?google_seo_error=404

RewriteCond %{HTTP_HOST} ^happydays.ir [NC]
RewriteRule ^(.*)$ http://www.happydays.ir/$1 [L,R=301]

RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www.)?happydays.ir.*$ [NC]
RewriteRule .(gif|jpg)$ – [F]

    # Default MyBB Rewrite Rules:

RewriteRule ^forum-([0-9]+).html forumdisplay.php?fid=$1 [L,QSA]

    RewriteRule ^forum-([0-9]+)-page-([0-9]+).html forumdisplay.php?fid=$1&page=$2 [L,QSA]



    RewriteRule ^thread-([0-9]+).html showthread.php?tid=$1 [L,QSA]

    RewriteRule ^thread-([0-9]+)-page-([0-9]+).html showthread.php?tid=$1&page=$2 [L,QSA]

    RewriteRule ^thread-([0-9]+)-lastpost.html showthread.php?tid=$1&action=lastpost [L,QSA]

    RewriteRule ^thread-([0-9]+)-nextnewest.html showthread.php?tid=$1&action=nextnewest [L,QSA]

    RewriteRule ^thread-([0-9]+)-nextoldest.html showthread.php?tid=$1&action=nextoldest [L,QSA]

    RewriteRule ^thread-([0-9]+)-newpost.html showthread.php?tid=$1&action=newpost [L,QSA]

    RewriteRule ^thread-([0-9]+)-post-([0-9]+).html showthread.php?tid=$1&pid=$2 [L,QSA]



    RewriteRule ^post-([0-9]+).html showthread.php?pid=$1 [L,QSA]



    RewriteRule ^announcement-([0-9]+).html announcements.php?aid=$1 [L,QSA]



    RewriteRule ^user-([0-9]+).html member.php?action=profile&uid=$1 [L,QSA]



    RewriteRule ^calendar-([0-9]+).html calendar.php?calendar=$1 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-year-([0-9]+).html calendar.php?action=yearview&calendar=$1&year=$2 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+).html calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+).html calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]

    RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+).html calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]



    RewriteRule ^event-([0-9]+).html calendar.php?action=event&eid=$1 [L,QSA]

    <IfModule mod_env.c>
        SetEnv SEO_SUPPORT 1
    </IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE application/x-javascript text/css text/html text/xml
</IfModule>

<IfModule mod_mime.c>
    AddType text/css .css
    AddType application/x-javascript .js
    AddType text/x-component .htc
    AddType text/html .html .htm
    AddType text/richtext .rtf .rtx
    AddType image/svg+xml .svg .svgz
    AddType text/plain .txt
    AddType text/xsd .xsd
    AddType text/xsl .xsl
    AddType text/xml .xml
    AddType video/asf .asf .asx .wax .wmv .wmx
    AddType video/avi .avi
    AddType image/bmp .bmp
    AddType application/java .class
    AddType video/divx .divx
    AddType application/msword .doc .docx
    AddType application/vnd.ms-fontobject .eot
    AddType application/x-msdownload .exe
    AddType image/gif .gif
    AddType application/x-gzip .gz .gzip
    AddType image/x-icon .ico
    AddType image/jpeg .jpg .jpeg .jpe
    AddType application/vnd.ms-access .mdb
    AddType audio/midi .mid .midi
    AddType video/quicktime .mov .qt
    AddType audio/mpeg .mp3 .m4a
    AddType video/mp4 .mp4 .m4v
    AddType video/mpeg .mpeg .mpg .mpe
    AddType application/vnd.ms-project .mpp
    AddType application/x-font-otf .otf
    AddType application/vnd.oasis.opendocument.database .odb
    AddType application/vnd.oasis.opendocument.chart .odc
    AddType application/vnd.oasis.opendocument.formula .odf
    AddType application/vnd.oasis.opendocument.graphics .odg
    AddType application/vnd.oasis.opendocument.presentation .odp
    AddType application/vnd.oasis.opendocument.spreadsheet .ods
    AddType application/vnd.oasis.opendocument.text .odt
    AddType audio/ogg .ogg
    AddType application/pdf .pdf
    AddType image/png .png
    AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
    AddType audio/x-realaudio .ra .ram
    AddType application/x-shockwave-flash .swf
    AddType application/x-tar .tar
    AddType image/tiff .tif .tiff
    AddType application/x-font-ttf .ttf .ttc
    AddType audio/wav .wav
    AddType audio/wma .wma
    AddType application/vnd.ms-write .wri
    AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
    AddType application/zip .zip
</IfModule>
<IfModule mod_expires.c>
    ExpiresActive On
    ExpiresByType text/css A31536000
    ExpiresByType application/x-javascript A31536000
    ExpiresByType text/x-component A31536000
    ExpiresByType text/html A3600
    ExpiresByType text/richtext A3600
    ExpiresByType image/svg+xml A3600
    ExpiresByType text/plain A3600
    ExpiresByType text/xsd A3600
    ExpiresByType text/xsl A3600
    ExpiresByType text/xml A3600
    ExpiresByType video/asf A31536000
    ExpiresByType video/avi A31536000
    ExpiresByType image/bmp A31536000
    ExpiresByType application/java A31536000
    ExpiresByType video/divx A31536000
    ExpiresByType application/msword A31536000
    ExpiresByType application/vnd.ms-fontobject A31536000
    ExpiresByType application/x-msdownload A31536000
    ExpiresByType image/gif A31536000
    ExpiresByType application/x-gzip A31536000
    ExpiresByType image/x-icon A31536000
    ExpiresByType image/jpeg A31536000
    ExpiresByType application/vnd.ms-access A31536000
    ExpiresByType audio/midi A31536000
    ExpiresByType video/quicktime A31536000
    ExpiresByType audio/mpeg A31536000
    ExpiresByType video/mp4 A31536000
    ExpiresByType video/mpeg A31536000
    ExpiresByType application/vnd.ms-project A31536000
    ExpiresByType application/x-font-otf A31536000
    ExpiresByType application/vnd.oasis.opendocument.database A31536000
    ExpiresByType application/vnd.oasis.opendocument.chart A31536000
    ExpiresByType application/vnd.oasis.opendocument.formula A31536000
    ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
    ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
    ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
    ExpiresByType application/vnd.oasis.opendocument.text A31536000
    ExpiresByType audio/ogg A31536000
    ExpiresByType application/pdf A31536000
    ExpiresByType image/png A31536000
    ExpiresByType application/vnd.ms-powerpoint A31536000
    ExpiresByType audio/x-realaudio A31536000
    ExpiresByType image/svg+xml A31536000
    ExpiresByType application/x-shockwave-flash A31536000
    ExpiresByType application/x-tar A31536000
    ExpiresByType image/tiff A31536000
    ExpiresByType application/x-font-ttf A31536000
    ExpiresByType audio/wav A31536000
    ExpiresByType audio/wma A31536000
    ExpiresByType application/vnd.ms-write A31536000
    ExpiresByType application/vnd.ms-excel A31536000
    ExpiresByType application/zip A31536000
</IfModule>
<IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    </IfModule>
    <IfModule mod_headers.c>
        Header append Vary User-Agent env=!dont-vary
    </IfModule>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
    </IfModule>
</IfModule>
<FilesMatch "\.(css|js|htc|CSS|JS|HTC)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
</FilesMatch>
<FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|X​​SL|XML)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
</FilesMatch>
<FilesMatch "\.(asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|j​​peg|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|od​g​|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf​|t​tc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip|ASF|ASX|WAX|WMV|WMX|AVI|BMP|CLASS|DIV​X|D​OC|DOCX|EOT|EXE|GIF|GZ|GZIP|ICO|JPG|JPEG|JPE|MDB|MID|MIDI|MOV|QT|MP3|M4A|MP4​|M4V​|MPEG|MPG|MPE|MPP|OTF|ODB|ODC|ODF|ODG|ODP|ODS|ODT|OGG|PDF|PNG|POT|PPS|PPT|P​PTX|R​A|RAM|SVG|SVGZ|SWF|TAR|TIF|TIFF|TTF|TTC|WAV|WMA|WRI|XLA|XLS|XLSX|XLT|XLW|Z​IP)$">
    <IfModule mod_headers.c>
        Header set Pragma "public"
        Header append Cache-Control "public, must-revalidate, proxy-revalidate"
    </IfModule>
    FileETag MTime Size
</FilesMatch>

درسته صالح جان ، اما استفاده از این کدها هم خیلی تاثیرگذار هست چون تصاویری زیادی توی قالب هستند که اگه کش بشن واقعا سرعت لود صفحات برای کاربران بالا میره .

متاسفانه کدی که دوستمون داد همه چیز رو کش میکنه و این باعث بوجود اومدن مشکل میشه .
انجمن روزهای شادی = http://www.happydays.ir

[تصویر:  1407544361.jpg]


[تصویر:  mohammad_za_sig.png]
پاسخ
 سپاس شده توسطصالح غلامیان (۱۳۹۳/۱/۲۵، ۲۲:۰۴:۳۲ عصر)
#10
نوید جان شما میتونید چیزهایی که نمیخواهید کش بشن را از کد حذف کنید الآن اگه این کد را نگاه کنید به جز صاحب سایت همه چیز رو برای کش شدن شامل میشهTongue

مثلا خط زیر در کد بالا مربوط میشه به فایل های میدی که فقط نرم افزارهای آهنگسازی قادر به اجرا هستند این ها رو اونم نه همشون چه طور ممکنه همچین فایلی برای اجرا در صفحات وب استفاده بشه بهتره به جز تصاویر باقی رو حذف کنید.

نقل‌قول: AddType audio/midi .mid .midi

موفق باشید
پاسخ
 سپاس شده توسطnavidahanj (۱۳۹۳/۱/۲۵، ۲۲:۴۰:۴۰ عصر) ، شماره مجازی (۱۴۰۱/۸/۲۶، ۰۱:۵۵:۴۳ صبح) ، گراف مسنجر (۱۴۰۱/۱۰/۳، ۰۴:۱۷:۳۰ صبح) ، چارتر ۴۲۴ (۱۴۰۲/۹/۱۲، ۱۵:۲۰:۰۸ عصر)


موضوع‌های مشابه…
موضوع نویسنده پاسخ بازدید آخرین ارسال
  فایل htaccess و اهمیت آن yaser0421 0 1,181 ۱۳۹۱/۹/۳۰، ۱۷:۵۱:۰۳ عصر
آخرین ارسال: yaser0421

پرش به انجمن:


کاربرانِ درحال بازدید از این موضوع: 1 مهمان