V
V
Valeriu Vodnicear2016-07-16 13:30:54
Apache HTTP Server
Valeriu Vodnicear, 2016-07-16 13:30:54

Apache caching on REG.RU hosting, any solutions?

Hello everyone :)
There is a site for invitations to Russia
There is such a .htacces file

AddDefaultCharset utf-8
php_flag magic_quotes_gpc Off
AddCharset utf-8 *
<IfModule mod_charset.c>
  CharsetSourceEnc utf-8
  CharsetDefault utf-8
</IfModule>
# 480 weeks
<FilesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|js|css|swf)$">
Header set Cache-Control "max-age=290304000, public"
</FilesMatch>

# 2 DAYS
<FilesMatch "\.(xml|txt)$">
Header set Cache-Control "max-age=172800, public, must-revalidate"
</FilesMatch>

# 2 HOURS
<FilesMatch "\.(html|htm)$">
Header set Cache-Control "max-age=7200, must-revalidate"
</FilesMatch>

<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>
<IfModule mod_expires.c>
  ExpiresActive on

# Your document html
  ExpiresByType text/html "access plus 600 seconds"

# Media: images, video, audio
  ExpiresByType audio/ogg "access plus 1 month"
  ExpiresByType image/gif "access plus 1 month"
  ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/jpg "access plus 1 month"
  ExpiresByType image/png "access plus 1 month"
  ExpiresByType video/mp4 "access plus 1 month"
  ExpiresByType video/ogg "access plus 1 month"
  ExpiresByType video/webm "access plus 1 month"

# CSS and JavaScript
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType text/css "access plus 1 year"
</IfModule>

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*) index.php?q=$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)$ index.php?url=$1 [QSA,L]

The site is hosted by REG.RU The
fact is that REG.RU writes here that setting up caching and / or compression of static files in the .htaccess file on shared hosting is not possible.
Can I somehow solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
zooks, 2016-07-16
@zooks

Of course - move to another hosting. Especially reg.ru - to put it mildly, not the best.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question