Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] Problem z kompresją strony, .htaccess
senior.pol
post
Post #1





Grupa: Zarejestrowani
Postów: 158
Pomógł: 0
Dołączył: 10.08.2011

Ostrzeżenie: (0%)
-----


Witam,

W pliku .htaccess mam następujący kod:

Kod
<IfModule mod_gzip.c>
    mod_gzip_on       Yes
    mod_gzip_dechunk  Yes
    mod_gzip_item_include file      \.(html?|txt|css|js|php|pl)$
    mod_gzip_item_include handler   ^cgi-script$
    mod_gzip_item_include mime      ^text/.*
    mod_gzip_item_include mime      ^application/x-javascript.*
    mod_gzip_item_exclude mime      ^image/.*
    mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
</IfModule>

RewriteEngine On

RewriteCond %{HTTP_HOST} ^sternicy.com.pl$
RewriteRule ^(.*)$ http://www.sternicy.com.pl/$1 [R=301,L]


RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php


Niestety po wykonaniu testu PageSpeed Insights dalej mam komunikat, aby włączyć kompresję. Czy to błąd w skrypcie, czy coś należy jeszcze dodać/poprawić?

Ktoś pomoże? (IMG:style_emoticons/default/co_jest.gif)

Ten post edytował senior.pol 26.03.2014, 19:22:50
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
IProSoft
post
Post #2





Grupa: Zarejestrowani
Postów: 479
Pomógł: 97
Dołączył: 6.09.2011
Skąd: php.net :)

Ostrzeżenie: (0%)
-----


Zerknij tutaj: http://gtmetrix.com/enable-gzip-compression.html

W Twoim kodzie jest literówka w 2 lini, stąd błąd 500
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 12.10.2025 - 10:21