Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [inne][PHP].htaccess - konfiguracja kompresji
tomi1985
post
Post #1





Grupa: Zarejestrowani
Postów: 192
Pomógł: 12
Dołączył: 23.09.2010
Skąd: Warszawa

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


Witam Serdecznie

Mam dość duży problem z próbą kompresji plików gzip na mojej stronce... a mianowicie nie działa mi (IMG:style_emoticons/default/sad.gif)

o to mój kod

  1.  
  2. <FilesMatch "\.(ico|jpg|jpeg|png|gif|js|css|swf)$">
  3. <IfModule mod_expires.c>
  4. ExpiresActive on
  5. ExpiresDefault A2592000
  6. Header append Cache-Control "public"
  7. </IfModule>
  8. Header unset ETag
  9. FileETag None
  10. </FilesMatch>
  11.  


sprawdzalem w
PageSpeed Insights i nic.. wogóle mi to nie działa...


dodam tylko, że robie to pierwszy także moja wiedza z tego za kresu nie jest powalająca

Czy mam coś wstawić również w nagłówku strony w php ? sam już nie wiem co muszę zrobić...

Ten post edytował tomi1985 11.11.2012, 16:37:22
Go to the top of the page
+Quote Post
 
Start new topic
Odpowiedzi
tomi1985
post
Post #2





Grupa: Zarejestrowani
Postów: 192
Pomógł: 12
Dołączył: 23.09.2010
Skąd: Warszawa

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


caly kod i nie dziala (IMG:style_emoticons/default/sad.gif) serwer mam na 1and1.pl

  1. AddType x-mapp-php5 .php
  2. AddHandler x-mapp-php5 .php
  3.  
  4. <IfModule mod_deflate.c>
  5.  
  6. # Force deflate for mangled headers developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping/
  7. <IfModule mod_setenvif.c>
  8. <IfModule mod_headers.c>
  9. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  10. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  11. </IfModule>
  12. </IfModule>
  13.  
  14. # Compress all output labeled with one of the following MIME-types
  15. <IfModule mod_filter.c>
  16. AddOutputFilterByType DEFLATE application/atom+xml \
  17. application/javascript \
  18. application/json \
  19. application/rss+xml \
  20. application/vnd.ms-fontobject \
  21. application/x-font-ttf \
  22. application/xhtml+xml \
  23. application/xml \
  24. font/opentype \
  25. image/svg+xml \
  26. image/x-icon \
  27. text/css \
  28. text/html \
  29. text/plain \
  30. text/x-component \
  31. text/xml
  32. </IfModule>
  33.  
  34. </IfModule>
  35.  
  36. RewriteEngine On
  37. # włączenie przepisywania linków
  38. RewriteBase /
  39.  
  40. RewriteRule regulamin/ regulamin.php
  41. RewriteRule cennik/ cennik.php
  42. RewriteRule kontakt/ kontakt.php
  43. RewriteRule search/ search.php
  44. RewriteRule polityka-prv/ polityka.php
  45. RewriteRule mapa/ mapa_serwis.php
  46. RewriteRule panel/ panel.php
  47. RewriteRule wspolpraca/ wspolpraca.php
  48.  
  49. #rejestracja
  50. RewriteRule ^regi,([^-]*).html$ /regi.php?i=$1 [L]
  51.  
  52.  
  53. RewriteRule ^search,([^-]*).html$ /search.php?reg=$1 [L]
  54.  
  55. RewriteRule ^/?([^/]*)/([^/]*)/$ search.php?view=$1&i=$2 [NC,L]
  56.  
  57.  
  58. #porcjowanie wyników dla kat, woj, reg
  59.  
  60. RewriteRule ^/?([^/]*)/([^/]*)/([^/]*)/([^/]*)/$ search.php?view=$1&i=$2&q=$3&f=$4 [NC,L]
  61.  
  62.  
  63. #porcjowanie wyników dla wyszukiwarki
  64.  
  65. RewriteRule ^/?([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/([^/]*)/$ search.php?view=$1&kategoria=$2&wojewodztwo=$3&miejscowosc=$4&q=$5&f=$6 [NC,L]
  66.  
  67.  
  68.  
  69. #show id
  70. RewriteRule ^/?([^/]*)/([^/]*).html$ show.php?id=$1&firm=$2 [L]
  71.  
  72.  
  73.  
  74. #admin log out, save
  75. RewriteRule ^admin,([^-]*).html$ /admin.php?view=$1 [L]
  76.  
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: 28.12.2025 - 20:36