نمایش نتایج: از شماره 1 تا 2 , از مجموع 2

موضوع: رفع ایراد فایل .htaccess

  1. #1
    عضو جدید parvizb7 آواتار ها
    تاریخ عضویت
    May 2011
    نوشته ها
    42
    تشکر تشکر کرده 
    52
    تشکر تشکر شده 
    27
    تشکر شده در
    27 پست

    پیش فرض رفع ایراد فایل .htaccess

    دوستان این فایل .htaccess منه. یه نفر بهم داده گفته از این استفاده کن.به نظرتون ایرادی چیزی نداره؟میتونم از این فایل استفاده بکنم؟

    کد:
    # 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
    ExpiresDefault "access plus 1 month"
    
    
    # Expiration for Images
    ExpiresByType image/gif "access plus 1 month"
    ExpiresByType image/png "access plus 1 month"
    ExpiresByType image/jpg "access plus 1 month"
    ExpiresByType image/jpeg "access plus 1 month"
    
    
    # Expiration for CSS
    ExpiresByType text/css "access plus 1 month”
    
    
    # Expiration for JavaScript
    ExpiresByType application/javascript "access plus 1 month"
    
    
    --
    
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_METHOD} POST
    RewriteCond %{REQUEST_URI} .wp-comments-post.php*
    RewriteCond %{HTTP_REFERER} !.*http://www.1arc.ir* [OR]
    RewriteCond %{HTTP_USER_AGENT} ^$
    RewriteRule (.*) ^http://%{REMOTE_ADDR}/$ [R=301,L]
    </IfModule>
    
    
    --
    
    
    # BEGIN WPSuperCache
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    #If you serve pages from behind a ***** you may want to change 'RewriteCond 
    %{HTTPS} on' to something more sensible
    AddDefaultCharset UTF-8
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} 
    !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} on
    RewriteCond 
    %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz 
    -f
    RewriteRule ^(.*) 
    "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html.gz" [L]
    
    
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} 
    !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteCond %{HTTPS} !on
    RewriteCond 
    %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz 
    -f
    RewriteRule ^(.*) 
    "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html.gz" [L]
    
    
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} 
    !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} on
    RewriteCond 
    %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html 
    -f
    RewriteRule ^(.*) 
    "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index-https.html" [L]
    
    
    RewriteCond %{REQUEST_METHOD} !POST
    RewriteCond %{QUERY_STRING} !.*=.*
    RewriteCond %{HTTP:Cookie} 
    !^.*(comment_author_|wordpress_logged_in|wp-postpass_).*$
    RewriteCond %{HTTP:X-Wap-Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTP:Profile} !^[a-z0-9\"]+ [NC]
    RewriteCond %{HTTPS} !on
    RewriteCond 
    %{DOCUMENT_ROOT}/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html -f
    RewriteRule ^(.*) 
    "/wp-content/cache/supercache/%{SERVER_NAME}/$1/index.html" [L]
    </IfModule>
    
    
    # END WPSuperCache

  2. # ADS




     

  3. #2
    کاربر اخراج شده
    تاریخ عضویت
    Jan 2014
    نوشته ها
    34
    تشکر تشکر کرده 
    33
    تشکر تشکر شده 
    13
    تشکر شده در
    8 پست

    پیش فرض پاسخ : رفع ایراد فایل .htaccess

    با سلام
    از کد های زیادی برای بهینه سازی سایت استفاده نکنید توی اینترنت بگردید چند تا کد هست برای بهینه سازی سایت از اون کد ها در این قسمت استفاده کنید

    موفق باشید.

اطلاعات موضوع

کاربرانی که در حال مشاهده این موضوع هستند

در حال حاضر 1 کاربر در حال مشاهده این موضوع است. (0 کاربران و 1 مهمان ها)

موضوعات مشابه

  1. اعمال نشدن تنظیمات php از فایل .htaccess
    توسط omidsm2000 در انجمن دايرکت ادمين DirectAdmin
    پاسخ ها: 0
    آخرين نوشته: September 12th, 2015, 16:58
  2. از کار افتادن htaccess
    توسط nader_star در انجمن سی پنل CPanel
    پاسخ ها: 3
    آخرين نوشته: December 16th, 2014, 21:14
  3. کانفیگ htaccess
    توسط mr_server در انجمن سی پنل CPanel
    پاسخ ها: 8
    آخرين نوشته: November 18th, 2014, 11:19
  4. حفاظت از وردپرس با htaccess
    توسط HPxf در انجمن Wordpress
    پاسخ ها: 0
    آخرين نوشته: October 7th, 2014, 10:19
  5. چندین دات در url + htaccess
    توسط fdlhost در انجمن وب سرورها
    پاسخ ها: 1
    آخرين نوشته: May 2nd, 2012, 17:50

مجوز های ارسال و ویرایش

  • شما نمیتوانید موضوع جدیدی ارسال کنید
  • شما امکان ارسال پاسخ را ندارید
  • شما نمیتوانید فایل پیوست کنید.
  • شما نمیتوانید پست های خود را ویرایش کنید
  •