Хабр Курсы для всех
РЕКЛАМА
Практикум, Хекслет, SkyPro, авторские курсы — собрали всех и попросили скидки. Осталось выбрать!
Если на eBay или Amazone увеличить скорость загрузки страниц на 9% они теряют 1% прибыли.
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_HOST} ^black-web
RewriteRule (.*) http://www.black-web.ru/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.black-web.ru/ [R=301,L]
</IfModule>
<?php
// Проверим что нас вызвали откуда надо, а не напрямую...
if (!defined('dummyCONSTANT')) die('I love U baby.....');
RewriteCond %{REQUEST_FILENAME} !index\.php$
RewriteRule ^.*\.php$ /index.php [L,QSA]
if (!defined('dummyCONSTANT')) die('I love U baby.....');<link rel="stylesheet" type="text/css" href="style.css?v=1" media="screen" />
<link rel="stylesheet" type="text/css" href="style.css?sid=5sdf4fs...." media="screen" />
<IfModule mod_setenvif.c>
SetEnv TZ Europe/Moscow
</IfModule>
php_value date.timezone Europe/Moscow
# Разрешение кеширования в этой папке
# Необходимо включение модулей
# mod_headers.c и mod_expires.c
#
<IfModule mod_expires.c>
ExpiresActive on
#ExpiresDefault "access plus 1 hours"
#ExpiresDefault "access plus 10 years"
ExpiresDefault "access plus 1 month"
ExpiresByType text/cache-manifest "access plus 59 seconds"
ExpiresByType text/html "access plus 59 seconds"
ExpiresByType text/xml "access plus 59 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/rss+xml "access plus 1 hours"
ExpiresByType image/x-icon "access plus 1 week"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType video/ogg "access plus 1 year"
ExpiresByType audio/ogg "access plus 1 year"
ExpiresByType audio/mp3 "access plus 1 year"
ExpiresByType video/mp4 "access plus 1 year"
ExpiresByType video/webm "access plus 1 year"
ExpiresByType text/x-component "access plus 1 month"
ExpiresByType font/truetype "access plus 1 year"
ExpiresByType font/opentype "access plus 1 year"
ExpiresByType application/x-font-woff "access plus 1 year"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
ExpiresByType text/css "access plus 1 hours"
ExpiresByType application/javascript "access plus 2 months"
ExpiresByType text/javascript "access plus 2 months"
<IfModule mod_headers.c>
Header append Cache-Control "public"
</IfModule>
</IfModule>
Попытка номер раз создать почти идеальный htaccess