2018-02-19 14:43
Podzielę się z wami pewnymi regułami, jeśli macie jakieś pomysły co można by było jeszcze dodać , o czym zapomniałem to zapraszam to dyskusji. Mam ustawione:
# Przekierowania z www na bez i odwrotnie: AddHandler application / x - httpd - php71 php RewriteCond %{ HTTP_HOST } ^ adres - strony . pl [ nc ] RewriteRule ^(.*)$ http : //www.adres-strony.pl/$1 [r=301,nc]
# Przekierowania z index i odwrotnie: Options + FollowSymLinks RewriteCond %{ THE_REQUEST } ^.*/ index . php RewriteRule ^(.*) index . php $ http : //www.obrazygaleria.pl/$1 [R=301,L]
# kompresja plikow tekstowych, html, javascript, css, xml: AddOutputFilterByType DEFLATE text / plain AddOutputFilterByType DEFLATE text / html AddOutputFilterByType DEFLATE text / xml AddOutputFilterByType DEFLATE text / css AddOutputFilterByType DEFLATE application / xml AddOutputFilterByType DEFLATE application / xhtml + xml AddOutputFilterByType DEFLATE application / rss + xml AddOutputFilterByType DEFLATE application / javascript AddOutputFilterByType DEFLATE application / x - javascript < FilesMatch "\.(ico|jpg|gif|png|css|js)$" > Header set Cache - Control "max-age=2851200, public" </ FilesMatch > < IfModule mod_expires . c > Header set cache - control : public ExpiresActive on ExpiresDefault "access plus 1 month" ExpiresByType text / html "access plus 1 hour" ExpiresByType application / rss + xml "access plus 1 hour" ExpiresByType image / png "access plus 1 month" ExpiresByType image / jpg "access plus 1 month" ExpiresByType image / jpeg "access plus 1 month" ExpiresByType video / ogg "access plus 1 month" ExpiresByType audio / ogg "access plus 1 month" ExpiresByType video / mp4 "access plus 1 month" ExpiresByType image / x - icon "access plus 1 year" ExpiresByType font / ttf "access plus 1 year" ExpiresByType image / svg + xml "access plus 1 year" </ IfModule >
# Blokada hotlinking czyli kradzieży obrazków RewriteEngine On RewriteCond %{ HTTP_REFERER } !^ http : //(.+\.)?obrazygaleria\.pl/ [NC] RewriteCond %{ HTTP_REFERER } !^$ RewriteCond %{ HTTP_REFERER } ! google \. [ NC ] RewriteCond %{ HTTP_REFERER } ! yahoo \. [ NC ] RewriteRule .*\.( jpe ? g | jpg | gif | bmp | png )$ - [ F ]
# Funkcja Keep-Alive < ifModule mod_headers . c > Header set Connection keep - alive </ ifModule >
» Quick.Cart v6.x