Advertisement
Guest User

htaccess

a guest
Jan 1st, 2023
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.07 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2.         RewriteEngine On
  3.         RewriteCond %{REQUEST_URI} ^/?\.user\.ini$
  4.         RewriteRule .* - [F,L,NC]
  5. </IfModule>
  6. <IfModule !mod_rewrite.c>
  7.     <Files ".user.ini">
  8.     <IfModule mod_authz_core.c>
  9.         Require all denied
  10.     </IfModule>
  11.     <IfModule !mod_authz_core.c>
  12.         Order deny,allow
  13.         Deny from all
  14.     </IfModule>
  15.     </Files>
  16. </IfModule>
  17. # BEGIN LSCACHE
  18. ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
  19. <IfModule LiteSpeed>
  20. RewriteEngine on
  21. CacheLookup on
  22. RewriteRule .* - [E=Cache-Control:no-autoflush]
  23. RewriteRule \.litespeed_conf\.dat - [F,L]
  24.  
  25. ### marker CACHE RESOURCE start ###
  26. RewriteRule wp-content/.*/[^/]*(responsive|css|js|dynamic|loader|fonts)\.php - [E=cache-control:max-age=3600]
  27. ### marker CACHE RESOURCE end ###
  28.  
  29. ### marker LOGIN COOKIE start ###
  30. RewriteRule .? - [E="Cache-Vary:,wp-postpass_f0924d04a68a212f3259c0dfe6e82d35"]
  31. ### marker LOGIN COOKIE end ###
  32.  
  33. ### marker FAVICON start ###
  34. RewriteRule favicon\.ico$ - [E=cache-control:max-age=86400]
  35. ### marker FAVICON end ###
  36.  
  37. ### marker WEBP start ###
  38. RewriteCond %{HTTP_ACCEPT} "image/webp"
  39. RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
  40. RewriteCond %{HTTP_USER_AGENT} iPhone.*Version/(\d{2}).*Safari
  41. RewriteCond %1 >13
  42. RewriteRule .* - [E=Cache-Control:vary=%{ENV:LSCACHE_VARY_VALUE}+webp]
  43. ### marker WEBP end ###
  44.  
  45. ### marker DROPQS start ###
  46. CacheKeyModify -qs:fbclid
  47. CacheKeyModify -qs:gclid
  48. CacheKeyModify -qs:utm*
  49. CacheKeyModify -qs:_ga
  50. ### marker DROPQS end ###
  51.  
  52. </IfModule>
  53. ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
  54. # END LSCACHE
  55. # BEGIN NON_LSCACHE
  56. ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
  57. ### marker BROWSER CACHE start ###
  58. <IfModule mod_expires.c>
  59. ExpiresActive on
  60. ExpiresByType application/pdf A31557600
  61. ExpiresByType image/x-icon A31557600
  62. ExpiresByType image/vnd.microsoft.icon A31557600
  63. ExpiresByType image/svg+xml A31557600
  64.  
  65. ExpiresByType image/jpg A31557600
  66. ExpiresByType image/jpeg A31557600
  67. ExpiresByType image/png A31557600
  68. ExpiresByType image/gif A31557600
  69. ExpiresByType image/webp A31557600
  70.  
  71. ExpiresByType video/ogg A31557600
  72. ExpiresByType audio/ogg A31557600
  73. ExpiresByType video/mp4 A31557600
  74. ExpiresByType video/webm A31557600
  75.  
  76. ExpiresByType text/css A31557600
  77. ExpiresByType text/javascript A31557600
  78. ExpiresByType application/javascript A31557600
  79. ExpiresByType application/x-javascript A31557600
  80.  
  81. ExpiresByType application/x-font-ttf A31557600
  82. ExpiresByType application/x-font-woff A31557600
  83. ExpiresByType application/font-woff A31557600
  84. ExpiresByType application/font-woff2 A31557600
  85. ExpiresByType application/vnd.ms-fontobject A31557600
  86. ExpiresByType font/ttf A31557600
  87. ExpiresByType font/otf A31557600
  88. ExpiresByType font/woff A31557600
  89. ExpiresByType font/woff2 A31557600
  90.  
  91. </IfModule>
  92. ### marker BROWSER CACHE end ###
  93.  
  94. ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ##
  95. # END NON_LSCACHE
  96.  
  97. ### Forcing HTTPS rule start      
  98. RewriteEngine On
  99. RewriteCond %{HTTPS} off
  100. RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
  101. ### Forcing HTTPS rule end
  102.            
  103. # BEGIN WordPress
  104. # The directives (lines) between "BEGIN WordPress" and "END WordPress" are
  105. # dynamically generated, and should only be modified via WordPress filters.
  106. # Any changes to the directives between these markers will be overwritten.
  107. <IfModule mod_rewrite.c>
  108. RewriteEngine On
  109. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  110. RewriteBase /
  111. RewriteRule ^index\.php$ - [L]
  112. RewriteCond %{REQUEST_FILENAME} !-f
  113. RewriteCond %{REQUEST_FILENAME} !-d
  114. RewriteRule . /index.php [L]
  115. </IfModule>
  116.  
  117. # END WordPress
  118.  
  119.  
  120. # Wordfence WAF
  121. <IfModule LiteSpeed>
  122. php_value auto_prepend_file '/var/www/html/wordfence-waf.php'
  123. </IfModule>
  124. <IfModule lsapi_module>
  125. php_value auto_prepend_file '/var/www/html/wordfence-waf.php'
  126. </IfModule>
  127. <Files ".user.ini">
  128. <IfModule mod_authz_core.c>
  129.     Require all denied
  130. </IfModule>
  131. <IfModule !mod_authz_core.c>
  132.     Order deny,allow
  133.     Deny from all
  134. </IfModule>
  135. </Files>
  136.  
  137. # END Wordfence WAF
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement