Htaccess File

zaer/intro-mvc-php/master/.htaccess

DEFLATE, Pragma, REQUEST_FILENAME
#php_value upload_max_filesize 64M
#php_value post_max_size 70M
#php_value memory_limit 128M
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?url=$1 [L,QSA]

######### EXPERIMENTAL ##########
#mantener conexion
<ifModule mod_headers.c>
  header set Connection keep-alive
  <FilesMatch ".(php|html|htm|txt|html5|jpg|png|js|css)$">
    header set Cache-Control "max-age=604800"
    header set last-modified "Tus Jun 3 13:00:00 EDT 2015"
  </FilesMatch>
  <FilesMatch ".(pl|cgi|spl|html)$">
    header unset Cache-Control
    header unset Expires
    header unset Last-Modified
    FileETag None
    header unset ETag
    header unset Pragma
  </FilesMatch>
  <FilesMatch ".(pl|cgi|spl|html)$">
    header unset Cache-Control
    header unset Expires
    header unset Last-Modified
    FileETag None
    header unset ETag
    header unset Pragma
  </FilesMatch>
</ifModule>

<ifmodule mod_expires.c>
  ExpiresActive On
  ExpiresDefault A604800
  <filesmatch ".(jpg|JPG|gif|GIF|png|PNG|css|CSS|ico|ICO|js|JS|otf|woff|ttf|php|html|js|css)$">
    ExpiresDefault "access plus 7 day"
  </filesmatch>
</ifmodule>
#comprimir archivos
<Files *.css>
  SetOutputFilter DEFLATE
</Files>

<Files *.js>
  SetOutputFilter DEFLATE
</Files>
#comprimiendo imagenes
<Files> *.png>
  SetOutputFilter DEFLATE
</Files>
<Files> *.jpg>
  SetOutputFilter DEFLATE
</Files>
<Files> *.gif>
  SetOutputFilter DEFLATE
</Files>
# compresion con gzip
<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>
Exit mobile version