godsplane
@godsplane

Есть ли какие то ошибки в файле .htaccess?

Собственно сам файл
spoiler
RewriteEngine on

SetEnvIf X-Forwarded-Proto https SERVER_PORT=443

SetEnvIf X-Forwarded-Proto https HTTPS=on

RewriteCond %{HTTP:HTTPS} !=on [NC]

RewriteRule ^(.*)$ https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]





# Leverage Browser Caching by SG-Optimizer

<IfModule mod_expires.c>

    ExpiresActive on

    ExpiresDefault                                      "access plus 2 months"

  # CSS

    ExpiresByType text/css                              "access plus 1 year"

  # Data interchange

    ExpiresByType application/json                      "access plus 0 seconds"

    ExpiresByType application/xml                       "access plus 0 seconds"

    ExpiresByType text/xml                              "access plus 0 seconds"

  # Favicon (cannot be renamed!)

    ExpiresByType image/x-icon                          "access plus 1 week"

  # HTML components (HTCs)

    ExpiresByType text/x-component                      "access plus 2 months"

  # HTML

    ExpiresByType text/html                             "access plus 0 seconds"

  # JavaScript

    ExpiresByType application/javascript                "access plus 1 year"

  # Manifest files

    ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"

    ExpiresByType text/cache-manifest                   "access plus 0 seconds"

  # Media

    ExpiresByType audio/ogg                             "access plus 2 months"

    ExpiresByType image/gif                             "access plus 2 months"

    ExpiresByType image/jpeg                            "access plus 2 months"

    ExpiresByType image/png                             "access plus 2 months"

    ExpiresByType video/mp4                             "access plus 2 months"

    ExpiresByType video/ogg                             "access plus 2 months"

    ExpiresByType video/webm                            "access plus 2 months"

  # Web feeds

    ExpiresByType application/atom+xml                  "access plus 1 hour"

    ExpiresByType application/rss+xml                   "access plus 1 hour"

  # Web fonts

    ExpiresByType application/font-woff                 "access plus 2 months"

    ExpiresByType application/font-woff2                "access plus 2 months"

    ExpiresByType application/vnd.ms-fontobject         "access plus 2 months"

    ExpiresByType application/x-font-ttf                "access plus 2 months"

    ExpiresByType font/opentype                         "access plus 2 months"

    ExpiresByType image/svg+xml                         "access plus 2 months"



</IfModule>

# END LBC

# GZIP enabled by SG-Optimizer

<IfModule mod_deflate.c>

    <IfModule mod_filter.c>

       AddOutputFilterByType DEFLATE "application/atom+xml" \

          "application/javascript" \

          "application/json" \

          "application/ld+json" \

          "application/manifest+json" \

          "application/rdf+xml" \

          "application/rss+xml" \

          "application/schema+json" \

          "application/vnd.geo+json" \

          "application/vnd.ms-fontobject" \

          "application/x-font-ttf" \

          "application/x-javascript" \

          "application/x-web-app-manifest+json" \

          "application/xhtml+xml" \

          "application/xml" \

          "font/eot" \

          "font/opentype" \

          "image/bmp" \

          "image/svg+xml" \

          "image/vnd.microsoft.icon" \

          "image/x-icon" \

          "text/cache-manifest" \

          "text/css" \

          "text/html" \

          "text/javascript" \

          "text/plain" \

          "text/vcard" \

          "text/vnd.rim.location.xloc" \

          "text/vtt" \

          "text/x-component" \

          "text/x-cross-domain-policy" \

          "text/xml"

    </IfModule>

</IfModule>

# END GZIP

# BEGIN WordPress

<IfModule mod_rewrite.c>

RewriteEngine On

RewriteBase /

RewriteRule ^index\.php$ - [L]

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule . /index.php [L]

</IfModule>



# END WordPress


Нужно ли что то убрать, что то добавить? Для оптимизации и тд?
  • Вопрос задан
  • 102 просмотра
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы