[text] public_html

Viewer

copydownloadembedprintName: public_html
  1. # BEGIN iThemes Security - Do not modify or remove this line
  2. # iThemes Security Config Details: 2
  3.         # Pass through Authorization header.
  4.         <IfModule mod_rewrite.c>
  5.                 RewriteEngine On
  6.                 RewriteCond %{HTTP:Authorization} ^(.*)
  7.                 RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
  8.         </IfModule>
  9.  
  10.         # Disable XML-RPC - Security > Settings > WordPress Tweaks > XML-RPC
  11.         <files xmlrpc.php>
  12.                 <IfModule mod_authz_core.c>
  13.                         Require all denied
  14.                 </IfModule>
  15.                 <IfModule !mod_authz_core.c>
  16.                         Order allow,deny
  17.                         Deny from all
  18.                 </IfModule>
  19.         </files>
  20.  
  21.         # Protect System Files - Security > Settings > System Tweaks > System Files
  22.         <files .htaccess>
  23.                 <IfModule mod_authz_core.c>
  24.                         Require all denied
  25.                 </IfModule>
  26.                 <IfModule !mod_authz_core.c>
  27.                         Order allow,deny
  28.                         Deny from all
  29.                 </IfModule>
  30.         </files>
  31.         <files readme.html>
  32.                 <IfModule mod_authz_core.c>
  33.                         Require all denied
  34.                 </IfModule>
  35.                 <IfModule !mod_authz_core.c>
  36.                         Order allow,deny
  37.                         Deny from all
  38.                 </IfModule>
  39.         </files>
  40.         <files readme.txt>
  41.                 <IfModule mod_authz_core.c>
  42.                         Require all denied
  43.                 </IfModule>
  44.                 <IfModule !mod_authz_core.c>
  45.                         Order allow,deny
  46.                         Deny from all
  47.                 </IfModule>
  48.         </files>
  49.         <files wp-config.php>
  50.                 <IfModule mod_authz_core.c>
  51.                         Require all denied
  52.                 </IfModule>
  53.                 <IfModule !mod_authz_core.c>
  54.                         Order allow,deny
  55.                         Deny from all
  56.                 </IfModule>
  57.         </files>
  58.  
  59.         # Disable Directory Browsing - Security > Settings > System Tweaks > Directory Browsing
  60.         Options -Indexes
  61.  
  62.         <IfModule mod_rewrite.c>
  63.                 RewriteEngine On
  64.  
  65.                 # Protect System Files - Security > Settings > System Tweaks > System Files
  66.                 RewriteRule ^wp-admin/install\.php$ - [F]
  67.                 RewriteRule ^wp-admin/includes/ - [F]
  68.                 RewriteRule !^wp-includes/ - [S=3]
  69.                 RewriteRule ^wp-includes/[^/]+\.php$ - [F]
  70.                 RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F]
  71.                 RewriteRule ^wp-includes/theme-compat/ - [F]
  72.                 RewriteCond %{REQUEST_FILENAME} -f
  73.                 RewriteRule (^|.*/)\.(git|svn)/.* - [F]
  74.  
  75.                 # Disable PHP in Uploads - Security > Settings > System Tweaks > PHP in Uploads
  76.                 RewriteRule ^wp\-content/uploads/.*\.(?:php[1-7]?|pht|phtml?|phps)\.?$ - [NC,F]
  77.  
  78.                 # Disable PHP in Plugins - Security > Settings > System Tweaks > PHP in Plugins
  79.                 RewriteRule ^wp\-content/plugins/.*\.(?:php[1-7]?|pht|phtml?|phps)\.?$ - [NC,F]
  80.  
  81.                 # Disable PHP in Themes - Security > Settings > System Tweaks > PHP in Themes
  82.                 RewriteRule ^wp\-content/themes/.*\.(?:php[1-7]?|pht|phtml?|phps)\.?$ - [NC,F]
  83.  
  84.                 # Filter Request Methods - Security > Settings > System Tweaks > Request Methods
  85.                 RewriteCond %{REQUEST_METHOD} ^(TRACE|TRACK) [NC]
  86.                 RewriteRule ^.* - [F]
  87.  
  88.                 # Filter Suspicious Query Strings in the URL - Security > Settings > System Tweaks > Suspicious Query Strings
  89.                 RewriteCond %{QUERY_STRING} \.\.\/ [OR]
  90.                 RewriteCond %{QUERY_STRING} \.(bash|git|hg|log|svn|swp|cvs) [NC,OR]
  91.                 RewriteCond %{QUERY_STRING} etc/passwd [NC,OR]
  92.                 RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]
  93.                 RewriteCond %{QUERY_STRING} ftp: [NC,OR]
  94.                 RewriteCond %{QUERY_STRING} https?: [NC,OR]
  95.                 RewriteCond %{QUERY_STRING} (<|%3C)script(>|%3E) [NC,OR]
  96.                 RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [NC,OR]
  97.                 RewriteCond %{QUERY_STRING} base64_decode\( [NC,OR]
  98.                 RewriteCond %{QUERY_STRING} %24&x [NC,OR]
  99.                 RewriteCond %{QUERY_STRING} 127\.0 [NC,OR]
  100.                 RewriteCond %{QUERY_STRING} (^|\W)(globals|encode|localhost|loopback)($|\W) [NC,OR]
  101.                 RewriteCond %{QUERY_STRING} (^|\W)(concat|insert|union|declare)($|\W) [NC,OR]
  102.                 RewriteCond %{QUERY_STRING} %[01][0-9A-F] [NC]
  103.                 RewriteCond %{QUERY_STRING} !^loggedout=true
  104.                 RewriteCond %{QUERY_STRING} !^action=jetpack-sso
  105.                 RewriteCond %{QUERY_STRING} !^action=rp
  106.                 RewriteCond %{HTTP_COOKIE} !wordpress_logged_in_
  107.                 RewriteCond %{HTTP_REFERER} !^http://maps\.googleapis\.com
  108.                 RewriteRule ^.* - [F]
  109.  
  110.                 # Filter Non-English Characters - Security > Settings > System Tweaks > Non-English Characters
  111.                 RewriteCond %{QUERY_STRING} %[A-F][0-9A-F] [NC]
  112.                 RewriteRule ^.* - [F]
  113.         </IfModule>
  114. # END iThemes Security - Do not modify or remove this line
  115.  
  116. # BEGIN WordPress
  117. # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
  118. # dynamically generated, and should only be modified via WordPress filters.
  119. # Any changes to the directives between these markers will be overwritten.
  120. <IfModule mod_rewrite.c>
  121. RewriteEngine On
  122. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  123. RewriteBase /
  124. RewriteRule ^index\.php$ - [L]
  125. RewriteCond %{REQUEST_FILENAME} !-f
  126. RewriteCond %{REQUEST_FILENAME} !-d
  127. RewriteRule . /index.php [L]
  128. </IfModule>
  129.  
  130. # END WordPress
  131.  
  132. # BEGIN WP-HUMMINGBIRD-CACHING
  133. # The directives (lines) between "BEGIN WP-HUMMINGBIRD-CACHING" and "END WP-HUMMINGBIRD-CACHING" are
  134. # dynamically generated, and should only be modified via WordPress filters.
  135. # Any changes to the directives between these markers will be overwritten.
  136. <IfModule mod_expires.c>
  137. ExpiresActive On
  138. ExpiresDefault A0
  139.  
  140. <FilesMatch "\.(txt|xml|js)$">
  141. ExpiresDefault A31536000
  142. </FilesMatch>
  143.  
  144. <FilesMatch "\.(css)$">
  145. ExpiresDefault A31536000
  146. </FilesMatch>
  147.  
  148. <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|woff2|svg)$">
  149. ExpiresDefault A31536000
  150. </FilesMatch>
  151.  
  152. <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
  153. ExpiresDefault A31536000
  154. </FilesMatch>
  155. </IfModule>
  156.  
  157. <IfModule mod_headers.c>
  158.   <FilesMatch "\.(txt|xml|js)$">
  159.    Header set Cache-Control "max-age=31536000"
  160.   </FilesMatch>
  161.  
  162.   <FilesMatch "\.(css)$">
  163.    Header set Cache-Control "max-age=31536000"
  164.   </FilesMatch>
  165.  
  166.   <FilesMatch "\.(flv|ico|pdf|avi|mov|ppt|doc|mp3|wmv|wav|mp4|m4v|ogg|webm|aac|eot|ttf|otf|woff|woff2|svg)$">
  167.    Header set Cache-Control "max-age=31536000"
  168.   </FilesMatch>
  169.  
  170.   <FilesMatch "\.(jpg|jpeg|png|gif|swf|webp)$">
  171.    Header set Cache-Control "max-age=31536000"
  172.   </FilesMatch>
  173. </IfModule>
  174. # END WP-HUMMINGBIRD-CACHING
  175. # BEGIN WP Performance Score Booster Settings
  176. # The directives (lines) between "BEGIN WP Performance Score Booster Settings" and "END WP Performance Score Booster Settings" are
  177. # dynamically generated, and should only be modified via WordPress filters.
  178. # Any changes to the directives between these markers will be overwritten.
  179.  
  180. ## BEGIN GZIP Compression ##
  181. <IfModule mod_deflate.c>
  182.     SetOutputFilter DEFLATE
  183.     <IfModule mod_setenvif.c>
  184.         <IfModule mod_headers.c>
  185.             SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  186.             RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  187.             SetEnvIfNoCase Request_URI \
  188.                 \.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g|mp4|webm|webp|pdf)$ no-gzip dont-vary
  189.         </IfModule>
  190.     </IfModule>
  191.     <IfModule mod_filter.c>
  192.         AddOutputFilterByType DEFLATE application/atom+xml \
  193.                                           application/javascript \
  194.                                           application/json \
  195.                                           application/rss+xml \
  196.                                           application/vnd.ms-fontobject \
  197.                                           application/x-font-ttf \
  198.                                           application/xhtml+xml \
  199.                                           application/xml \
  200.                                           font/opentype \
  201.                                           image/svg+xml \
  202.                                           image/x-icon \
  203.                                           text/css \
  204.                                           text/html \
  205.                                           text/plain \
  206.                                           text/x-component \
  207.                                           text/xml
  208.     </IfModule>
  209.     <IfModule mod_headers.c>
  210.         Header append Vary: Accept-Encoding
  211.     </IfModule>
  212. </IfModule>
  213. <IfModule mod_mime.c>
  214.     AddType text/html .html_gzip
  215.     AddEncoding gzip .html_gzip
  216. </IfModule>
  217. <IfModule mod_setenvif.c>
  218.     SetEnvIfNoCase Request_URI \.html_gzip$ no-gzip
  219. </IfModule>
  220. ## END GZIP Compression ##
  221.  
  222. ## BEGIN Leverage Browser Caching (Expires headers) for better cache control ##
  223. <IfModule mod_expires.c>
  224.     ExpiresActive on
  225.     ExpiresByType text/cache-manifest           "access plus 0 seconds"
  226.     # Media files
  227.     ExpiresByType image/gif                     "access plus 4 months"
  228.     ExpiresByType image/png                     "access plus 4 months"
  229.     ExpiresByType image/jpeg                    "access plus 4 months"
  230.     ExpiresByType image/webp                    "access plus 4 months"
  231.     ExpiresByType video/ogg                     "access plus 1 month"
  232.     ExpiresByType audio/ogg                     "access plus 1 month"
  233.     ExpiresByType video/mp4                     "access plus 1 month"
  234.     ExpiresByType video/webm                    "access plus 1 month"
  235.     ExpiresByType text/x-component              "access plus 1 month"
  236.     # Webfonts
  237.     ExpiresByType font/ttf                      "access plus 4 months"
  238.     ExpiresByType font/otf                      "access plus 4 months"
  239.     ExpiresByType font/woff                     "access plus 4 months"
  240.     ExpiresByType font/woff2                    "access plus 4 months"
  241.     ExpiresByType image/svg+xml                 "access plus 1 month"
  242.     ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
  243.     ExpiresByType text/css                      "access plus 1 year"
  244.     ExpiresByType application/javascript        "access plus 1 year"
  245.     # HTML and Data
  246.     ExpiresByType text/html                     "access plus 0 seconds"
  247.     ExpiresByType text/xml                      "access plus 0 seconds"
  248.     ExpiresByType application/xml               "access plus 0 seconds"
  249.     ExpiresByType application/json              "access plus 0 seconds"
  250.     # Feed
  251.     ExpiresByType application/rss+xml           "access plus 1 hour"
  252.     ExpiresByType application/atom+xml          "access plus 1 hour"
  253.     # Favicon
  254.     ExpiresByType image/x-icon                  "access plus 1 week"
  255.     # Default
  256.     ExpiresDefault "access plus 2 days"
  257. </IfModule>
  258. ## END Leverage Browser Caching (Expires headers) for better cache control ##
  259.  
  260. ## BEGIN Disable ETag and set Cache-Control headers ##
  261. <IfModule mod_headers.c>
  262.     Header unset ETag
  263. </IfModule>
  264. # Since we’re sending far-future expires, we don’t need ETags for static content.
  265. FileETag None
  266. <IfModule mod_alias.c>
  267.     <FilesMatch "\.(css|htc|js|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|eot|exe|gif|gz|gzip|ico|jpg|jpeg|jpe|json|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|otf|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|svg|svgz|swf|tar|tif|tiff|ttf|ttc|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$">
  268.         <IfModule mod_headers.c>
  269.             Header unset Pragma
  270.             Header append Cache-Control "public"
  271.         </IfModule>
  272.     </FilesMatch>
  273.     <FilesMatch "\.(html|htm|rtf|rtx|txt|xsd|xsl|xml)$">
  274.         <IfModule mod_headers.c>
  275.             Header set X-Powered-By "WP Performance Score Booster/2.0"
  276.             Header unset Pragma
  277.             Header append Cache-Control "public"
  278.             Header unset Last-Modified
  279.         </IfModule>
  280.     </FilesMatch>
  281. </IfModule>
  282. ## END Disable ETag and set Cache-Control headers ##
  283. # END WP Performance Score Booster Settings

Editor

You can edit this paste and save as new:


File Description
  • public_html
  • Paste Code
  • 13 May-2021
  • 11.14 Kb
You can Share it: