Advertisement
Guest User

.htaccess wordpress

a guest
Nov 21st, 2014
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 19.80 KB | None | 0 0
  1. # BULLETPROOF .51.3 >>>>>>> SECURE .HTACCESS
  2.  
  3. # PHP/PHP.INI HANDLER/CACHE CODE
  4. # Use BPS Custom Code to add php/php.ini Handler and Cache htaccess code and to save it permanently.
  5. # Most Hosts do not have/use/require php/php.ini Handler htaccess code
  6.  
  7. # TURN OFF YOUR SERVER SIGNATURE
  8. # Suppresses the footer line server version number and ServerName of the serving virtual host
  9. ServerSignature Off
  10.  
  11. # DO NOT SHOW DIRECTORY LISTING
  12. # Disallow mod_autoindex from displaying a directory listing
  13. # If a 500 Internal Server Error occurs when activating Root BulletProof Mode
  14. # copy the entire DO NOT SHOW DIRECTORY LISTING and DIRECTORY INDEX sections of code
  15. # and paste it into BPS Custom Code and comment out Options -Indexes
  16. # by adding a # sign in front of it.
  17. # Example: #Options -Indexes
  18. Options -Indexes
  19.  
  20. # DIRECTORY INDEX FORCE INDEX.PHP
  21. # Use index.php as default directory index file. index.html will be ignored.
  22. # If a 500 Internal Server Error occurs when activating Root BulletProof Mode
  23. # copy the entire DO NOT SHOW DIRECTORY LISTING and DIRECTORY INDEX sections of code
  24. # and paste it into BPS Custom Code and comment out DirectoryIndex
  25. # by adding a # sign in front of it.
  26. # Example: #DirectoryIndex index.php index.html /index.php
  27. DirectoryIndex index.php index.html /index.php
  28.  
  29. # BRUTE FORCE LOGIN PAGE PROTECTION
  30. # PLACEHOLDER ONLY
  31. # Use BPS Custom Code to add Brute Force Login protection code and to save it permanently.
  32. # See this link: http://forum.ait-pro.com/forums/topic/protect-login-page-from-brute-force-login-attacks/
  33. # for more information.
  34.  
  35. # BPS ERROR LOGGING AND TRACKING
  36. # BPS has premade 403 Forbidden, 400 Bad Request and 404 Not Found files that are used
  37. # to track and log 403, 400 and 404 errors that occur on your website. When a hacker attempts to
  38. # hack your website the hackers IP address, Host name, Request Method, Referering link, the file name or
  39. # requested resource, the user agent of the hacker and the query string used in the hack attempt are logged.
  40. # All BPS log files are htaccess protected so that only you can view them.
  41. # The 400.php, 403.php and 404.php files are located in /wp-content/plugins/bulletproof-security/
  42. # The 400 and 403 Error logging files are already set up and will automatically start logging errors
  43. # after you install BPS and have activated BulletProof Mode for your Root folder.
  44. # If you would like to log 404 errors you will need to copy the logging code in the BPS 404.php file
  45. # to your Theme's 404.php template file. Simple instructions are included in the BPS 404.php file.
  46. # You can open the BPS 404.php file using the WP Plugins Editor.
  47. # NOTE: By default WordPress automatically looks in your Theme's folder for a 404.php template file.
  48. ErrorDocument 400 /wp-content/plugins/bulletproof-security/400.php
  49. ErrorDocument 401 default
  50. ErrorDocument 403 /wp-content/plugins/bulletproof-security/403.php
  51. ErrorDocument 404 /404.php
  52.  
  53. # DENY ACCESS TO PROTECTED SERVER FILES AND FOLDERS
  54. # Use BPS Custom Code to modify/edit/change this code and to save it permanently.
  55. # Files and folders starting with a dot: .htaccess, .htpasswd, .errordocs, .logs
  56. RedirectMatch 403 \.(htaccess|htpasswd|errordocs|logs)$
  57.  
  58. Options +FollowSymLinks
  59. # BEGIN WordPress
  60. <IfModule mod_rewrite.c>
  61. RewriteEngine On
  62. RewriteBase /
  63. RewriteRule ^index.php$ - [L]
  64. RewriteCond %{REQUEST_FILENAME} !-f
  65. RewriteCond %{REQUEST_FILENAME} !-d
  66. RewriteRule . /index.php [L]
  67. </IfModule>
  68.  
  69. # END WordPress
  70.  
  71. # WP-ADMIN/INCLUDES
  72. # Use BPS Custom Code to remove this code permanently.
  73. RewriteEngine On
  74. RewriteBase /
  75. RewriteRule ^wp-admin/includes/ - [F]
  76. RewriteRule !^wp-includes/ - [S=3]
  77. RewriteRule ^wp-includes/[^/]+\.php$ - [F]
  78. RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F]
  79. RewriteRule ^wp-includes/theme-compat/ - [F]
  80.  
  81. # WP REWRITE LOOP START
  82. RewriteEngine On
  83. RewriteBase /
  84. RewriteRule ^index\.php$ - [L]
  85.  
  86. # REQUEST METHODS FILTERED
  87. # If you want to allow HEAD Requests use BPS Custom Code and
  88. # remove/delete HEAD| from the Request Method filter.
  89. # Example: RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK|DEBUG) [NC]
  90. # The TRACE, DELETE, TRACK and DEBUG Request methods should never be removed.
  91. RewriteCond %{REQUEST_METHOD} ^(HEAD|TRACE|DELETE|TRACK|DEBUG) [NC]
  92. RewriteRule ^(.*)$ - [F]
  93.  
  94. # PLUGINS/THEMES AND VARIOUS EXPLOIT FILTER SKIP RULES
  95. # To add plugin/theme skip/bypass rules use BPS Custom Code.
  96. # The [S] flag is used to skip following rules. Skip rule [S=12] will skip 12 following RewriteRules.
  97. # The skip rules MUST be in descending consecutive number order: 12, 11, 10, 9...
  98. # If you delete a skip rule, change the other skip rule numbers accordingly.
  99. # Examples: If RewriteRule [S=5] is deleted than change [S=6] to [S=5], [S=7] to [S=6], etc.
  100. # If you add a new skip rule above skip rule 12 it will be skip rule 13: [S=13]
  101.  
  102. # Adminer MySQL management tool data populate
  103. RewriteCond %{REQUEST_URI} ^/wp-content/plugins/adminer/ [NC]
  104. RewriteRule . - [S=12]
  105. # Comment Spam Pack MU Plugin - CAPTCHA images not displaying
  106. RewriteCond %{REQUEST_URI} ^/wp-content/mu-plugins/custom-anti-spam/ [NC]
  107. RewriteRule . - [S=11]
  108. # Peters Custom Anti-Spam display CAPTCHA Image
  109. RewriteCond %{REQUEST_URI} ^/wp-content/plugins/peters-custom-anti-spam-image/ [NC]
  110. RewriteRule . - [S=10]
  111. # Status Updater plugin fb connect
  112. RewriteCond %{REQUEST_URI} ^/wp-content/plugins/fb-status-updater/ [NC]
  113. RewriteRule . - [S=9]
  114. # Stream Video Player - Adding FLV Videos Blocked
  115. RewriteCond %{REQUEST_URI} ^/wp-content/plugins/stream-video-player/ [NC]
  116. RewriteRule . - [S=8]
  117. # XCloner 404 or 403 error when updating settings
  118. RewriteCond %{REQUEST_URI} ^/wp-content/plugins/xcloner-backup-and-restore/ [NC]
  119. RewriteRule . - [S=7]
  120. # BuddyPress Logout Redirect
  121. RewriteCond %{QUERY_STRING} action=logout&redirect_to=http%3A%2F%2F(.*) [NC]
  122. RewriteRule . - [S=6]
  123. # redirect_to=
  124. RewriteCond %{QUERY_STRING} redirect_to=(.*) [NC]
  125. RewriteRule . - [S=5]
  126. # Login Plugins Password Reset And Redirect 1
  127. RewriteCond %{QUERY_STRING} action=resetpass&key=(.*) [NC]
  128. RewriteRule . - [S=4]
  129. # Login Plugins Password Reset And Redirect 2
  130. RewriteCond %{QUERY_STRING} action=rp&key=(.*) [NC]
  131. RewriteRule . - [S=3]
  132.  
  133. # TIMTHUMB FORBID RFI and MISC FILE SKIP/BYPASS RULE
  134. # Use BPS Custom Code to modify/edit/change this code and to save it permanently.
  135. # Remote File Inclusion (RFI) security rules
  136. # Note: Only whitelist your additional domains or files if needed - do not whitelist hacker domains or files
  137. RewriteCond %{QUERY_STRING} ^.*(http|https|ftp)(%3A|:)(%2F|/)(%2F|/)(w){0,3}.?(blogger|picasa|blogspot|tsunami|petapolitik|photobucket|imgur|imageshack|wordpress\.com|img\.youtube|tinypic\.com|upload\.wikimedia|kkc|start-thegame).*$ [NC,OR]
  138. RewriteCond %{THE_REQUEST} ^.*(http|https|ftp)(%3A|:)(%2F|/)(%2F|/)(w){0,3}.?(blogger|picasa|blogspot|tsunami|petapolitik|photobucket|imgur|imageshack|wordpress\.com|img\.youtube|tinypic\.com|upload\.wikimedia|kkc|start-thegame).*$ [NC]
  139. RewriteRule .* index.php [F]
  140. #
  141. # Example: Whitelist additional misc files: (example\.php|another-file\.php|phpthumb\.php|thumb\.php|thumbs\.php)
  142. RewriteCond %{REQUEST_URI} (timthumb\.php|phpthumb\.php|thumb\.php|thumbs\.php) [NC]
  143. # Example: Whitelist additional website domains: RewriteCond %{HTTP_REFERER} ^.*(YourWebsite.com|AnotherWebsite.com).*
  144. RewriteCond %{HTTP_REFERER} ^.*demo2.local.*
  145. RewriteCond %{HTTP_REFERER} ^.*blog.hassounakhalil.com.*
  146. RewriteRule . - [S=1]
  147.  
  148. # BEGIN BPSQSE BPS QUERY STRING EXPLOITS
  149. # The libwww-perl User Agent is forbidden - Many bad bots use libwww-perl modules, but some good bots use it too.
  150. # Good sites such as W3C use it for their W3C-LinkChecker.
  151. # Use BPS Custom Code to add or remove user agents temporarily or permanently from the
  152. # User Agent filters directly below or to modify/edit/change any of the other security code rules below.
  153. RewriteCond %{HTTP_USER_AGENT} (havij|libwww-perl|wget|python|nikto|curl|scan|java|winhttp|clshttp|loader) [NC,OR]
  154. RewriteCond %{HTTP_USER_AGENT} (%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
  155. RewriteCond %{HTTP_USER_AGENT} (;|<|>|'|"|\)|\(|%0A|%0D|%22|%27|%28|%3C|%3E|%00).*(libwww-perl|wget|python|nikto|curl|scan|java|winhttp|HTTrack|clshttp|archiver|loader|email|harvest|extract|grab|miner) [NC,OR]
  156. RewriteCond %{THE_REQUEST} (\?|\*|%2a)+(%20+|\\s+|%20+\\s+|\\s+%20+|\\s+%20+\\s+)HTTP(:/|/) [NC,OR]
  157. RewriteCond %{THE_REQUEST} etc/passwd [NC,OR]
  158. RewriteCond %{THE_REQUEST} cgi-bin [NC,OR]
  159. RewriteCond %{THE_REQUEST} (%0A|%0D|\\r|\\n) [NC,OR]
  160. RewriteCond %{REQUEST_URI} owssvr\.dll [NC,OR]
  161. RewriteCond %{HTTP_REFERER} (%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
  162. RewriteCond %{HTTP_REFERER} \.opendirviewer\. [NC,OR]
  163. RewriteCond %{HTTP_REFERER} users\.skynet\.be.* [NC,OR]
  164. RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=http:// [NC,OR]
  165. RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=(\.\.//?)+ [NC,OR]
  166. RewriteCond %{QUERY_STRING} [a-zA-Z0-9_]=/([a-z0-9_.]//?)+ [NC,OR]
  167. RewriteCond %{QUERY_STRING} \=PHP[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12} [NC,OR]
  168. RewriteCond %{QUERY_STRING} (\.\./|%2e%2e%2f|%2e%2e/|\.\.%2f|%2e\.%2f|%2e\./|\.%2e%2f|\.%2e/) [NC,OR]
  169. RewriteCond %{QUERY_STRING} ftp\: [NC,OR]
  170. RewriteCond %{QUERY_STRING} http\: [NC,OR]
  171. RewriteCond %{QUERY_STRING} https\: [NC,OR]
  172. RewriteCond %{QUERY_STRING} \=\|w\| [NC,OR]
  173. RewriteCond %{QUERY_STRING} ^(.*)/self/(.*)$ [NC,OR]
  174. RewriteCond %{QUERY_STRING} ^(.*)cPath=http://(.*)$ [NC,OR]
  175. RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
  176. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
  177. RewriteCond %{QUERY_STRING} (\<|%3C).*embed.*(\>|%3E) [NC,OR]
  178. RewriteCond %{QUERY_STRING} (<|%3C)([^e]*e)+mbed.*(>|%3E) [NC,OR]
  179. RewriteCond %{QUERY_STRING} (\<|%3C).*object.*(\>|%3E) [NC,OR]
  180. RewriteCond %{QUERY_STRING} (<|%3C)([^o]*o)+bject.*(>|%3E) [NC,OR]
  181. RewriteCond %{QUERY_STRING} (\<|%3C).*iframe.*(\>|%3E) [NC,OR]
  182. RewriteCond %{QUERY_STRING} (<|%3C)([^i]*i)+frame.*(>|%3E) [NC,OR]
  183. RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR]
  184. RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]*\([^)]*\) [NC,OR]
  185. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  186. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2}) [OR]
  187. RewriteCond %{QUERY_STRING} ^.*(\(|\)|<|>|%3c|%3e).* [NC,OR]
  188. RewriteCond %{QUERY_STRING} ^.*(\x00|\x04|\x08|\x0d|\x1b|\x20|\x3c|\x3e|\x7f).* [NC,OR]
  189. RewriteCond %{QUERY_STRING} (NULL|OUTFILE|LOAD_FILE) [OR]
  190. RewriteCond %{QUERY_STRING} (\.{1,}/)+(motd|etc|bin) [NC,OR]
  191. RewriteCond %{QUERY_STRING} (localhost|loopback|127\.0\.0\.1) [NC,OR]
  192. RewriteCond %{QUERY_STRING} (<|>|'|%0A|%0D|%27|%3C|%3E|%00) [NC,OR]
  193. RewriteCond %{QUERY_STRING} concat[^\(]*\( [NC,OR]
  194. RewriteCond %{QUERY_STRING} union([^s]*s)+elect [NC,OR]
  195. RewriteCond %{QUERY_STRING} union([^a]*a)+ll([^s]*s)+elect [NC,OR]
  196. RewriteCond %{QUERY_STRING} \-[sdcr].*(allow_url_include|allow_url_fopen|safe_mode|disable_functions|auto_prepend_file) [NC,OR]
  197. RewriteCond %{QUERY_STRING} (;|<|>|'|"|\)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/\*|union|select|insert|drop|delete|update|cast|create|char|convert|alter|declare|order|script|set|md5|benchmark|encode) [NC,OR]
  198. RewriteCond %{QUERY_STRING} (sp_executesql) [NC]
  199. RewriteRule ^(.*)$ - [F]
  200. # END BPSQSE BPS QUERY STRING EXPLOITS
  201. RewriteCond %{REQUEST_FILENAME} !-f
  202. RewriteCond %{REQUEST_FILENAME} !-d
  203. RewriteRule . /index.php [L]
  204. # WP REWRITE LOOP END
  205.  
  206. # DENY BROWSER ACCESS TO THESE FILES
  207. # Use BPS Custom Code to modify/edit/change this code and to save it permanently.
  208. # wp-config.php, bb-config.php, php.ini, php5.ini, readme.html
  209. # Replace 88.77.66.55 with your current IP address and remove the
  210. # pound sign # in front of the Allow from line of code below to be able to access
  211. # any of these files directly from your Browser.
  212.  
  213. <FilesMatch "^(wp-config\.php|php\.ini|php5\.ini|readme\.html|bb-config\.php)">
  214. Order Allow,Deny
  215. Deny from all
  216. #Allow from 88.77.66.55
  217. </FilesMatch>
  218.  
  219. # HOTLINKING/FORBID COMMENT SPAMMERS/BLOCK BOTS/BLOCK IP/REDIRECT CODE
  220. # PLACEHOLDER ONLY
  221. # Use BPS Custom Code to add custom code and save it permanently here.# BEGIN W3TC Browser Cache
  222. <IfModule mod_mime.c>
  223. AddType text/css .css
  224. AddType text/x-component .htc
  225. AddType application/x-javascript .js
  226. AddType application/javascript .js2
  227. AddType text/javascript .js3
  228. AddType text/x-js .js4
  229. AddType text/html .html .htm
  230. AddType text/richtext .rtf .rtx
  231. AddType image/svg+xml .svg .svgz
  232. AddType text/plain .txt
  233. AddType text/xsd .xsd
  234. AddType text/xsl .xsl
  235. AddType text/xml .xml
  236. AddType video/asf .asf .asx .wax .wmv .wmx
  237. AddType video/avi .avi
  238. AddType image/bmp .bmp
  239. AddType application/java .class
  240. AddType video/divx .divx
  241. AddType application/msword .doc .docx
  242. AddType application/vnd.ms-fontobject .eot
  243. AddType application/x-msdownload .exe
  244. AddType image/gif .gif
  245. AddType application/x-gzip .gz .gzip
  246. AddType image/x-icon .ico
  247. AddType image/jpeg .jpg .jpeg .jpe
  248. AddType application/json .json
  249. AddType application/vnd.ms-access .mdb
  250. AddType audio/midi .mid .midi
  251. AddType video/quicktime .mov .qt
  252. AddType audio/mpeg .mp3 .m4a
  253. AddType video/mp4 .mp4 .m4v
  254. AddType video/mpeg .mpeg .mpg .mpe
  255. AddType application/vnd.ms-project .mpp
  256. AddType application/x-font-otf .otf
  257. AddType application/vnd.ms-opentype .otf
  258. AddType application/vnd.oasis.opendocument.database .odb
  259. AddType application/vnd.oasis.opendocument.chart .odc
  260. AddType application/vnd.oasis.opendocument.formula .odf
  261. AddType application/vnd.oasis.opendocument.graphics .odg
  262. AddType application/vnd.oasis.opendocument.presentation .odp
  263. AddType application/vnd.oasis.opendocument.spreadsheet .ods
  264. AddType application/vnd.oasis.opendocument.text .odt
  265. AddType audio/ogg .ogg
  266. AddType application/pdf .pdf
  267. AddType image/png .png
  268. AddType application/vnd.ms-powerpoint .pot .pps .ppt .pptx
  269. AddType audio/x-realaudio .ra .ram
  270. AddType application/x-shockwave-flash .swf
  271. AddType application/x-tar .tar
  272. AddType image/tiff .tif .tiff
  273. AddType application/x-font-ttf .ttf .ttc
  274. AddType application/vnd.ms-opentype .ttf .ttc
  275. AddType audio/wav .wav
  276. AddType audio/wma .wma
  277. AddType application/vnd.ms-write .wri
  278. AddType application/font-woff .woff
  279. AddType application/vnd.ms-excel .xla .xls .xlsx .xlt .xlw
  280. AddType application/zip .zip
  281. </IfModule>
  282. <IfModule mod_expires.c>
  283. ExpiresActive On
  284. ExpiresByType text/css A31536000
  285. ExpiresByType text/x-component A31536000
  286. ExpiresByType application/x-javascript A31536000
  287. ExpiresByType application/javascript A31536000
  288. ExpiresByType text/javascript A31536000
  289. ExpiresByType text/x-js A31536000
  290. ExpiresByType text/html A3600
  291. ExpiresByType text/richtext A3600
  292. ExpiresByType image/svg+xml A3600
  293. ExpiresByType text/plain A3600
  294. ExpiresByType text/xsd A3600
  295. ExpiresByType text/xsl A3600
  296. ExpiresByType text/xml A3600
  297. ExpiresByType video/asf A31536000
  298. ExpiresByType video/avi A31536000
  299. ExpiresByType image/bmp A31536000
  300. ExpiresByType application/java A31536000
  301. ExpiresByType video/divx A31536000
  302. ExpiresByType application/msword A31536000
  303. ExpiresByType application/vnd.ms-fontobject A31536000
  304. ExpiresByType application/x-msdownload A31536000
  305. ExpiresByType image/gif A31536000
  306. ExpiresByType application/x-gzip A31536000
  307. ExpiresByType image/x-icon A31536000
  308. ExpiresByType image/jpeg A31536000
  309. ExpiresByType application/json A31536000
  310. ExpiresByType application/vnd.ms-access A31536000
  311. ExpiresByType audio/midi A31536000
  312. ExpiresByType video/quicktime A31536000
  313. ExpiresByType audio/mpeg A31536000
  314. ExpiresByType video/mp4 A31536000
  315. ExpiresByType video/mpeg A31536000
  316. ExpiresByType application/vnd.ms-project A31536000
  317. ExpiresByType application/x-font-otf A31536000
  318. ExpiresByType application/vnd.ms-opentype A31536000
  319. ExpiresByType application/vnd.oasis.opendocument.database A31536000
  320. ExpiresByType application/vnd.oasis.opendocument.chart A31536000
  321. ExpiresByType application/vnd.oasis.opendocument.formula A31536000
  322. ExpiresByType application/vnd.oasis.opendocument.graphics A31536000
  323. ExpiresByType application/vnd.oasis.opendocument.presentation A31536000
  324. ExpiresByType application/vnd.oasis.opendocument.spreadsheet A31536000
  325. ExpiresByType application/vnd.oasis.opendocument.text A31536000
  326. ExpiresByType audio/ogg A31536000
  327. ExpiresByType application/pdf A31536000
  328. ExpiresByType image/png A31536000
  329. ExpiresByType application/vnd.ms-powerpoint A31536000
  330. ExpiresByType audio/x-realaudio A31536000
  331. ExpiresByType image/svg+xml A31536000
  332. ExpiresByType application/x-shockwave-flash A31536000
  333. ExpiresByType application/x-tar A31536000
  334. ExpiresByType image/tiff A31536000
  335. ExpiresByType application/x-font-ttf A31536000
  336. ExpiresByType application/vnd.ms-opentype A31536000
  337. ExpiresByType audio/wav A31536000
  338. ExpiresByType audio/wma A31536000
  339. ExpiresByType application/vnd.ms-write A31536000
  340. ExpiresByType application/font-woff A31536000
  341. ExpiresByType application/vnd.ms-excel A31536000
  342. ExpiresByType application/zip A31536000
  343. </IfModule>
  344. <IfModule mod_deflate.c>
  345. <IfModule mod_headers.c>
  346. Header append Vary User-Agent env=!dont-vary
  347. </IfModule>
  348. AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
  349. <IfModule mod_mime.c>
  350. # DEFLATE by extension
  351. AddOutputFilter DEFLATE js css htm html xml
  352. </IfModule>
  353. </IfModule>
  354. <FilesMatch "\.(css|htc|less|js|js2|js3|js4|CSS|HTC|LESS|JS|JS2|JS3|JS4)$">
  355. FileETag MTime Size
  356. <IfModule mod_headers.c>
  357. Header set Pragma "public"
  358. Header append Cache-Control "public"
  359. Header set X-Powered-By "W3 Total Cache/0.9.4"
  360. </IfModule>
  361. </FilesMatch>
  362. <FilesMatch "\.(html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|HTML|HTM|RTF|RTX|SVG|SVGZ|TXT|XSD|XSL|XML)$">
  363. FileETag MTime Size
  364. <IfModule mod_headers.c>
  365. Header set Pragma "public"
  366. Header append Cache-Control "public"
  367. Header set X-Powered-By "W3 Total Cache/0.9.4"
  368. </IfModule>
  369. </FilesMatch>
  370. <FilesMatch "\.(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|woff|xla|xls|xlsx|xlt|xlw|zip|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|WOFF|XLA|XLS|XLSX|XLT|XLW|ZIP)$">
  371. FileETag MTime Size
  372. <IfModule mod_headers.c>
  373. Header set Pragma "public"
  374. Header append Cache-Control "public"
  375. Header set X-Powered-By "W3 Total Cache/0.9.4"
  376. </IfModule>
  377. </FilesMatch>
  378. # END W3TC Browser Cache
  379. # BEGIN W3TC Page Cache core
  380. <IfModule mod_rewrite.c>
  381. RewriteEngine On
  382. RewriteBase /
  383. RewriteCond %{HTTP:Accept-Encoding} gzip
  384. RewriteRule .* - [E=W3TC_ENC:_gzip]
  385. RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
  386. RewriteRule .* - [E=W3TC_PREVIEW:_preview]
  387. RewriteCond %{REQUEST_METHOD} !=POST
  388. RewriteCond %{QUERY_STRING} =""
  389. RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
  390. RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f
  391. RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
  392. </IfModule>
  393. # END W3TC Page Cache core
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement