Advertisement
Guest User

Untitled

a guest
Oct 18th, 2015
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.02 KB | None | 0 0
  1. ##
  2. # @package Joomla
  3. # @copyright Copyright (C) 2005 - 2015 Open Source Matters. All rights reserved.
  4. # @license GNU General Public License version 2 or later; see LICENSE.txt
  5. ##
  6.  
  7. ##
  8. # READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
  9. #
  10. # The line just below this section: 'Options +FollowSymLinks' may cause problems
  11. # with some server configurations. It is required for use of mod_rewrite, but may already
  12. # be set by your server administrator in a way that disallows changing it in
  13. # your .htaccess file. If using it causes your server to error out, comment it out (add # to
  14. # beginning of line), reload your site in your browser and test your sef url's. If they work,
  15. # it has been set by your server administrator and you do not need it set here.
  16. ##
  17.  
  18. ## No directory listings
  19. IndexIgnore *
  20.  
  21. ## VON MIR GEANDERT Can be commented out if causes errors, see notes above.
  22. # Options +FollowSymlinks
  23. Options -Indexes
  24.  
  25. ## Mod_rewrite in use.
  26.  
  27. RewriteEngine On
  28.  
  29. ## Begin - Rewrite rules to block out some common exploits.
  30. # If you experience problems on your site block out the operations listed below
  31. # This attempts to block the most common type of exploit `attempts` to Joomla!
  32. #
  33. # Block out any script trying to base64_encode data within the URL.
  34. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
  35. # Block out any script that includes a <script> tag in URL.
  36. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
  37. # Block out any script trying to set a PHP GLOBALS variable via URL.
  38. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  39. # Block out any script trying to modify a _REQUEST variable via URL.
  40. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  41. # Return 403 Forbidden header and show the content of the root homepage
  42. RewriteRule .* index.php [F]
  43. #
  44. ## End - Rewrite rules to block out some common exploits.
  45.  
  46. ## Begin - Custom redirects
  47. #
  48. # If you need to redirect some pages, or set a canonical non-www to
  49. # www redirect (or vice versa), place that code here. Ensure those
  50. # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
  51. #
  52. ## End - Custom redirects
  53.  
  54. ##
  55. # Uncomment following line if your webserver's URL
  56. # is not directly related to physical file paths.
  57. # Update Your Joomla! Directory (just / for root).
  58. ##
  59.  
  60. ### BROWSER CACHE
  61.  
  62. <IfModule mod_expires.c>
  63.  
  64. # Begin - Automatic compression of resources
  65.  
  66. AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript
  67.  
  68. # Enable expiration control
  69. ExpiresActive On
  70. ExpiresDefault "access plus 1 seconds"
  71.  
  72. # CSS and JS expiration: 1 week after request
  73. ExpiresByType text/css "now plus 1 week"
  74. ExpiresByType application/javascript "now plus 1 week"
  75. ExpiresByType application/x-javascript "now plus 1 week"
  76.  
  77. # Image files expiration: 1 month after request
  78. ExpiresByType image/bmp "now plus 1 month"
  79. ExpiresByType image/gif "now plus 1 month"
  80. ExpiresByType image/jpeg "now plus 1 month"
  81. ExpiresByType image/jp2 "now plus 1 month"
  82.  
  83. ExpiresByType text/html "access plus 600 seconds"
  84. ExpiresByType text/javascript "access plus 216000 seconds"
  85. ExpiresByType application/xhtml+xml "access plus 600 seconds"
  86. ExpiresByType image/jpeg "access plus 2592000 seconds"
  87. ExpiresByType image/png "access plus 2592000 seconds"
  88.  
  89. </IfModule>
  90.  
  91. RewriteBase /home
  92.  
  93. ## Begin - Joomla! core SEF Section.
  94. #
  95. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  96. #
  97. # If the requested path and file is not /index.php and the request
  98. # has not already been internally rewritten to the index.php script
  99. RewriteCond %{REQUEST_URI} !^/index\.php
  100. # and the requested path and file doesn't directly match a physical file
  101. RewriteCond %{REQUEST_FILENAME} !-f
  102. # and the requested path and file doesn't directly match a physical folder
  103. RewriteCond %{REQUEST_FILENAME} !-d
  104. # internally rewrite the request to the index.php script
  105. RewriteRule .* index.php [L]
  106. #
  107. ## End - Joomla! core SEF Section.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement