رفتن به مطلب

کش شدن سایت


پست های پیشنهاد شده

سلام من از افزونه جی زیپ استفاده می کردم

به پیشنهاد یکی از دوستان توی انجمن از کد استفاده کردم

ولی الان سایتم کش می شه

هیچکس پستای جدیدو نمی بینه همه قدیمیارو می بینن .

یه سریا فکر کردن سایت غیر فعال شده انقدر پستا عوض نشده . چی کار کنم ؟ ممنون می شم کمک کنید

اینم کدی که به پیشنهاد دوستان اضافه کردم

<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.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 application/javascript
<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
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
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 text/html "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 1 month"
</IfModule>
## EXPIRES CACHING ##
# BEGIN WPSuperCache
# END WPSuperCache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

کجاش مشکل داره که این اتفاق می افته ؟

لینک به ارسال

به اینصورت تغییرش بدین و چک کنین:


<IfModule mod_mime.c>
AddType application/x-javascript .js
AddType text/css .css
</IfModule>
<IfModule mod_deflate.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 application/javascript
<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
</IfModule>
<IfModule mod_headers.c>
Header append Vary User-Agent env=!dont-vary
</IfModule>
</IfModule>
## EXPIRES CACHING ##
<IfModule mod_expires.c>
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"
ExpiresByType text/html A30
ExpiresDefault "access 1 month"
</IfModule>
## EXPIRES CACHING ##
# BEGIN WPSuperCache
# END WPSuperCache
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

لینک به ارسال

عالی عالی عالی عالی ... کارت درسته بخدا و...... ایول

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

ویرایش شده توسط 10000000
لینک به ارسال

نه من نذاشتم

اینم کد فانکشن . چون من هر چی گشتم گیر نیاوردم

<?php
require_once('resizer.php');
if ( function_exists('register_sidebar') )
register_sidebar( array (
'name'=> 'سایدبار ادامه مطلب',
'before_widget' => '<div class="def-block widget"><div class="widget-content">',
'after_widget' => ' </div> </div>',
'before_title' => '<h4>',
'after_title' => '</h4><span class="liner"></span>'
));
if ( function_exists('register_sidebar') )
register_sidebar( array (
'name'=> 'ورود به سایت',
'before_widget' => '<div class="def-block widget"><div class="widget-content">',
'after_widget' => ' </div> </div>',
'before_title' => '<h4>',
'after_title' => '</h4><span class="liner"></span>'
));


function mw_pagination($pages = '', $range = 2)
{
$showitems = ($range * 2)+1;

global $paged;
if(empty($paged)) $paged = 1;

if($pages == '')
{
global $wp_query;
$pages = $wp_query->max_num_pages;
if(!$pages)
{
$pages = 1;
}
}

if(1 != $pages)
{
echo "<div class='pagination cf'>";
if($paged > 2 && $paged > $range+1 && $showitems < $pages) echo "<a href='".get_pagenum_link(1)."'>«</a>";
if($paged > 1 && $showitems < $pages) echo "<a href='".get_pagenum_link($paged - 1)."'>‹</a>";

for ($i=1; $i <= $pages; $i++)
{
if (1 != $pages &&( !($i >= $paged+$range+1 || $i <= $paged-$range-1) || $pages <= $showitems ))
{
echo ($paged == $i)? "<span class='current'>".$i."</span>":"<a href='".get_pagenum_link($i)."' class='inactive' >".$i."</a>";
}
}

if ($paged < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($paged + 1)."'>›</a>";
if ($paged < $pages-1 && $paged+$range-1 < $pages && $showitems < $pages) echo "<a href='".get_pagenum_link($pages)."'>»</a>";
echo "</div>\n";
}
}

register_nav_menus( array(
'primary' => __( 'منو اصلی', 'wp-my' ),
) );


require( get_template_directory() . '/admin/functions.php' );
include_once('metabox.php');
if (function_exists('add_theme_support')) {
add_theme_support( 'post-thumbnails' );
}
function excerpt($length) {
return 30;
}
function more($more) {
return ' ...';
}
add_filter('excerpt_more', 'more');
add_filter('excerpt_length', 'excerpt');
if (function_exists('add_image_size')){
add_image_size( 'first-thumb', 900, 500, false);
add_image_size( 'secound-thumb', 800, 600, true);
add_image_size( 'third-thumb', 125, 125, true);
add_image_size( 'new-thumb', 250, 250, false);
add_image_size( 'six-thumb', 1200, 1200, true);
}
function autoset_featured() {
global $post;
$already_has_thumb = has_post_thumbnail($post->ID);
if (!$already_has_thumb) {
$attached_image = get_children( "post_parent=$post->ID&post_type=attachment&post_mime_type=image&numberposts=1" );
if ($attached_image) {
foreach ($attached_image as $attachment_id => $attachment) {
set_post_thumbnail($post->ID, $attachment_id);
}
}
}
} //end function
add_action('the_post', 'autoset_featured');
add_action('save_post', 'autoset_featured');
add_action('draft_to_publish', 'autoset_featured');
add_action('new_to_publish', 'autoset_featured');
add_action('pending_to_publish', 'autoset_featured');
add_action('future_to_publish', 'autoset_featured');
remove_action( 'wp_head', 'rsd_link' );
remove_action( 'wp_head', 'wlwmanifest_link' );
remove_action( 'wp_head', 'wp_generator' );
remove_action( 'wp_head', 'start_post_rel_link' );
remove_action( 'wp_head', 'index_rel_link' );
remove_action( 'wp_head', 'adjacent_posts_rel_link' );
remove_action( 'wp_head', 'wp_shortlink_wp_head' );

?>

لینک به ارسال

آها راست میگی ... راستی در کد های اسمی از super wp cach برده شده ایا افزونه هم استفاده کردید ؟ درکل به نظر خودت تاثیری داشته در لود و صفحاتت ؟

یادم یه کدی هم بود که تصاویر رو در مرحله ایی که کاربر سایت رو باز می کرد روی سیستم کاربر ذخیره می کرد تا در بارگذاری صفحات تاثیر داشته باشه کسی اون کد رو داره ؟

لینک به ارسال

به گفتگو بپیوندید

هم اکنون می توانید مطلب خود را ارسال نمایید و بعداً ثبت نام کنید. اگر حساب کاربری دارید، برای ارسال با حساب کاربری خود اکنون وارد شوید .

مهمان
ارسال پاسخ به این موضوع ...

×   شما در حال چسباندن محتوایی با قالب بندی هستید.   حذف قالب بندی

  تنها استفاده از 75 اموجی مجاز می باشد.

×   لینک شما به صورت اتوماتیک جای گذاری شد.   نمایش به صورت لینک

×   محتوای قبلی شما بازگردانی شد.   پاک کردن محتوای ویرایشگر

×   شما مستقیما نمی توانید تصویر خود را قرار دهید. یا آن را اینجا بارگذاری کنید یا از یک URL قرار دهید.

×
×
  • اضافه کردن...