[text] file

Viewer

  1. <IfModule mod_rewrite.c>
  2.   RewriteEngine on
  3.  
  4.   # Ensure the Authorization HTTP header is available to PHP
  5.   RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  6.  
  7.   # Uncomment the following lines if you are not using a `public` directory
  8.   # to prevent sensitive resources from being exposed.
  9.   # RewriteRule /\.git / [F,L]
  10.   # RewriteRule ^auth\.json$ / [F,L]
  11.   # RewriteRule ^composer\.(lock|json)$ / [F,L]
  12.   # RewriteRule ^config.php$ / [F,L]
  13.   # RewriteRule ^flarum$ / [F,L]
  14.   # RewriteRule ^storage/(.*)?$ / [F,L]
  15.   # RewriteRule ^vendor/(.*)?$ / [F,L]
  16.   
  17.  
  18.   # Pass requests that don't refer directly to files in the filesystem to index.php
  19.   RewriteCond %{REQUEST_FILENAME} !-f
  20.   RewriteCond %{REQUEST_FILENAME} !-d
  21.   RewriteRule ^ index.php [QSA,L]
  22. </IfModule>
  23.  
  24. # Disable directory listings
  25. Options -Indexes
  26.  
  27. # MultiViews can mess up our rewriting scheme
  28. Options -MultiViews
  29.  
  30. # The following directives are based on best practices from H5BP Apache Server Configs
  31. # https://github.com/h5bp/server-configs-apache
  32.  
  33. # Expire rules for static content
  34. <IfModule mod_expires.c>
  35.   ExpiresActive on
  36.   ExpiresDefault                                      "access plus 1 month"
  37.   ExpiresByType text/css                              "access plus 1 year"
  38.   ExpiresByType application/atom+xml                  "access plus 1 hour"
  39.   ExpiresByType application/rdf+xml                   "access plus 1 hour"
  40.   ExpiresByType application/rss+xml                   "access plus 1 hour"
  41.   ExpiresByType application/json                      "access plus 0 seconds"
  42.   ExpiresByType application/ld+json                   "access plus 0 seconds"
  43.   ExpiresByType application/schema+json               "access plus 0 seconds"
  44.   ExpiresByType application/vnd.geo+json              "access plus 0 seconds"
  45.   ExpiresByType application/vnd.api+json              "access plus 0 seconds"
  46.   ExpiresByType application/xml                       "access plus 0 seconds"
  47.   ExpiresByType text/calendar                         "access plus 0 seconds"
  48.   ExpiresByType text/xml                              "access plus 0 seconds"
  49.   ExpiresByType image/vnd.microsoft.icon              "access plus 1 week"
  50.   ExpiresByType image/x-icon                          "access plus 1 week"
  51.   ExpiresByType text/html                             "access plus 0 seconds"
  52.   ExpiresByType application/javascript                "access plus 1 year"
  53.   ExpiresByType application/x-javascript              "access plus 1 year"
  54.   ExpiresByType text/javascript                       "access plus 1 year"
  55.   ExpiresByType application/manifest+json             "access plus 1 week"
  56.   ExpiresByType application/x-web-app-manifest+json   "access plus 0 seconds"
  57.   ExpiresByType text/cache-manifest                   "access plus 0 seconds"
  58.   ExpiresByType text/markdown                         "access plus 0 seconds"
  59.   ExpiresByType audio/ogg                             "access plus 1 month"
  60.   ExpiresByType image/bmp                             "access plus 1 month"
  61.   ExpiresByType image/gif                             "access plus 1 month"
  62.   ExpiresByType image/jpeg                            "access plus 1 month"
  63.   ExpiresByType image/png                             "access plus 1 month"
  64.   ExpiresByType image/svg+xml                         "access plus 1 month"
  65.   ExpiresByType image/webp                            "access plus 1 month"
  66.   ExpiresByType video/mp4                             "access plus 1 month"
  67.   ExpiresByType video/ogg                             "access plus 1 month"
  68.   ExpiresByType video/webm                            "access plus 1 month"
  69.   ExpiresByType application/wasm                      "access plus 1 year"
  70.   ExpiresByType font/collection                       "access plus 1 month"
  71.   ExpiresByType application/vnd.ms-fontobject         "access plus 1 month"
  72.   ExpiresByType font/eot                              "access plus 1 month"
  73.   ExpiresByType font/opentype                         "access plus 1 month"
  74.   ExpiresByType font/otf                              "access plus 1 month"
  75.   ExpiresByType application/x-font-ttf                "access plus 1 month"
  76.   ExpiresByType font/ttf                              "access plus 1 month"
  77.   ExpiresByType application/font-woff                 "access plus 1 month"
  78.   ExpiresByType application/x-font-woff               "access plus 1 month"
  79.   ExpiresByType font/woff                             "access plus 1 month"
  80.   ExpiresByType application/font-woff2                "access plus 1 month"
  81.   ExpiresByType font/woff2                            "access plus 1 month"
  82.   ExpiresByType text/x-cross-domain-policy            "access plus 1 week"
  83. </IfModule>
  84.  
  85. # Gzip compression
  86. <IfModule mod_deflate.c>
  87.   <IfModule mod_filter.c>
  88.     AddOutputFilterByType DEFLATE "application/atom+xml" \
  89.                                   "application/javascript" \
  90.                                   "application/json" \
  91.                                   "application/ld+json" \
  92.                                   "application/manifest+json" \
  93.                                   "application/rdf+xml" \
  94.                                   "application/rss+xml" \
  95.                                   "application/schema+json" \
  96.                                   "application/vnd.geo+json" \
  97.                                   "application/vnd.ms-fontobject" \
  98.                                   "application/wasm" \
  99.                                   "application/x-font-ttf" \
  100.                                   "application/x-javascript" \
  101.                                   "application/x-web-app-manifest+json" \
  102.                                   "application/xhtml+xml" \
  103.                                   "application/xml" \
  104.                                   "font/collection" \
  105.                                   "font/eot" \
  106.                                   "font/opentype" \
  107.                                   "font/otf" \
  108.                                   "font/ttf" \
  109.                                   "image/bmp" \
  110.                                   "image/svg+xml" \
  111.                                   "image/vnd.microsoft.icon" \
  112.                                   "image/x-icon" \
  113.                                   "text/cache-manifest" \
  114.                                   "text/calendar" \
  115.                                   "text/css" \
  116.                                   "text/html" \
  117.                                   "text/javascript" \
  118.                                   "text/plain" \
  119.                                   "text/markdown" \
  120.                                   "text/vcard" \
  121.                                   "text/vnd.rim.location.xloc" \
  122.                                   "text/vtt" \
  123.                                   "text/x-component" \
  124.                                   "text/x-cross-domain-policy" \
  125.                                   "text/xml"
  126.     </IfModule>
  127. </IfModule>
  128.  
  129. # Fix for https://httpoxy.org vulnerability
  130. <IfModule mod_headers.c>
  131.   RequestHeader unset Proxy
  132. </IfModule>
  133.  
  134. RewriteEngine on
  135. RewriteCond %{HTTP_HOST} ^www.vuejstr\.com [NC]
  136. RewriteRule ^(.*)$ http://vuejstr.com/$1 [L,R=301]
  137. RewriteEngine On
  138. RewriteCond %{HTTPS} off
  139. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

Editor

You can edit this paste and save as new:


File Description
  • file
  • Paste Code
  • 13 Dec-2020
  • 7.21 Kb
You can Share it: