быстрая загрузка сайта с .htaccess

(Ответов: 8, Просмотров: 795)
  1. Студент
    • Регистрация: 09.12.2014
    • Сообщений: 77
    • Репутация: 4
    • Webmoney BL: ?
    Прошу поделиться кому не жалко содержанием своего .htaccess для быстрой загрузки сайта с кэшированием и тому подобное.Буду очень признателен форумчане!
    • 0
  2. Гуру Аватар для Елена Ильчук
    • Регистрация: 02.10.2014
    • Сообщений: 515
    • Репутация: 96
    Содержимое стандартного файла .htaccess для CMS Joomla 2.5 – 3.
    PHP код:
    ##
    # @package    Joomla
    # @copyright    Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
    # @license    GNU General Public License version 2 or later; see LICENSE.txt
    ##

    ##
    # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
    #
    # The line just below this section: 'Options +FollowSymLinks' may cause problems
    # with some server configurations. It is required for use of mod_rewrite, but may already
    # be set by your server administrator in a way that dissallows changing it in
    # your .htaccess file. If using it causes your server to error out, comment it out (add # to
    # beginning of line), reload your site in your browser and test your sef url's. If they work,
    # it has been set by your server administrator and you do not need it set here.
    ##

    ## Can be commented out if causes errors, see notes above.
    Options +FollowSymLinks

    ## Mod_rewrite in use.

    RewriteEngine On

    ## Begin - Rewrite rules to block out some common exploits.
    # If you experience problems on your site block out the operations listed below
    # This attempts to block the most common type of exploit `attempts` to Joomla!
    #
    # Block out any script trying to base64_encode data within the URL.
    RewriteCond %{QUERY_STRINGbase64_encode[^(]*\([^)]*\) [OR]
    # Block out any script that includes a <script> tag in URL.
    RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
    # Block out any script trying to set a PHP GLOBALS variable via URL.
    RewriteCond %{QUERY_STRINGGLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
    # Block out any script trying to modify a _REQUEST variable via URL.
    RewriteCond %{QUERY_STRING_REQUEST(=|\[|\%[0-9A-Z]{0,2})
    # Return 403 Forbidden header and show the content of the root homepage
    RewriteRule .* index.php [F]
    #
    ## End - Rewrite rules to block out some common exploits.

    ## Begin - Custom redirects
    #
    # If you need to redirect some pages, or set a canonical non-www to
    # www redirect (or vice versa), place that code here. Ensure those
    # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
    #
    ## End - Custom redirects

    ##
    # Uncomment following line if your webserver's URL
    # is not directly related to physical file paths.
    # Update Your Joomla! Directory (just / for root).
    ##

    # RewriteBase /

    ## Begin - Joomla! core SEF Section.
    #
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
    #
    # If the requested path and file is not /index.php and the request
    # has not already been internally rewritten to the index.php script
    RewriteCond %{REQUEST_URI} !^/index\.php
    # and the request is for something within the component folder,
    # or for the site root, or for an extensionless URL, or the
    # requested URL ends with one of the listed extensions
    RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|raw))$ [NC]
    # and the requested path and file doesn't directly match a physical file
    RewriteCond %{REQUEST_FILENAME} !-f
    # and the requested path and file doesn't directly match a physical folder
    RewriteCond %{REQUEST_FILENAME} !-d
    # internally rewrite the request to the index.php script
    RewriteRule .* index.php [L]
    #
    ## End - Joomla! core SEF Section. 
    Качественное продвижение Ваших сайтов! Разработка сайтов с нуля.
    • 0
  3. Гуру Аватар для Fartuna
    • Регистрация: 07.01.2015
    • Сообщений: 932
    • Репутация: 764
    Содержимое файла с кешированием для Wordpress
    Код HTML:
    # 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> <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>
    
    # END WordPress
    Последний раз редактировалось Fartuna; 12.02.2015 в 00:06.
    • 0
  4. Студент
    • Регистрация: 09.12.2014
    • Сообщений: 77
    • Репутация: 4
    • Webmoney BL: ?
    положил сайт
    • 0
  5. Студент
    • Регистрация: 03.02.2015
    • Сообщений: 31
    • Репутация: 5
    autorenta, смотри какие есть библиотеки на твоем хостинге
    • 0
  6. Гуру Аватар для Ems
    • Регистрация: 24.05.2011
    • Сообщений: 2,032
    • Репутация: 663
    Это кеширование со стороны браузера. Нужно настраивать кеширование на сервере. Тогда будет заметно. Просто установкой плагина кеширования здесь не обойтись или правками .htaccess
    Облачный хостинг из TOP-3 - от 1 Gb ОЗУ, от 25 GB SSD.
    • 0
  7. Гуру Аватар для aeneas
    • Регистрация: 24.12.2014
    • Сообщений: 879
    • Репутация: 115
    • Webmoney BL: ?
    хтассес увеличивает скорость загрузки сайта ?? штото новое
    насчет кэширования не знаю я поставил как тут http://alaev.info/blog/post/4143
    пока полет нормальный )
    • 0
  8. Хитрый вебмастер =) Аватар для nomibius
    • Регистрация: 29.12.2012
    • Сообщений: 301
    • Репутация: 129
    Держите файлик оптимизации и кеширования.
    Вложения
    • 1

    Спасибо сказали:

    aeneas(16.02.2015),
  9. Гуру Аватар для aeneas
    • Регистрация: 24.12.2014
    • Сообщений: 879
    • Репутация: 115
    • Webmoney BL: ?
    Цитата Сообщение от nomibius Посмотреть сообщение
    Держите файлик оптимизации и кеширования.
    как понял этого ненужно для НЕвысокопосещаемых ? к примеру у меня узкая тема там сотня две посетителей, оно это надо ?
    и еще - пользую плагин WP Super Cache, нафига он тогда нужен ?
    • 0

Похожие темы

Темы Раздел Ответов Последний пост
Загрузка другого сайта через свой сайт...
Вопросы от новичков 3 09.05.2014 22:33
Загрузка текстов + загрузка файлов + заполнение мета тегов.
Другая работа 5 21.02.2014 19:13
Быстрая индексация молодого сайта
Вопросы от новичков 22 06.03.2013 22:47
Загрузка сайта
Web программирование 17 13.02.2012 21:39
Загрузка рекламы тормозит загрузку сайта.
Вопросы от новичков 6 20.11.2011 02:31

У кого попросить инвайт?

Вы можете попросить инвайт у любого модератора:

Информеры