SHARE
TWEET

.htaccess.txt Joomla

Light1992 Jul 17th, 2019 59 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ##
  2. # @package    Joomla
  3. # @copyright  Copyright (C) 2005 - 2019 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 'Options +FollowSymLinks' may cause problems with some server configurations.
  11. # It is required for the use of mod_rewrite, but it may have already been set by your
  12. # server administrator in a way that disallows changing it in this .htaccess file.
  13. # If using it causes your site to produce an error, comment it out (add # to the
  14. # beginning of the line), reload your site in your browser and test your sef urls. If
  15. # they work, then it has been set by your server administrator and you do not need to
  16. # set it here.
  17. ##
  18.  
  19. ## No directory listings
  20. <IfModule autoindex>
  21.   IndexIgnore *
  22. </IfModule>
  23.  
  24. ## Suppress mime type detection in browsers for unknown types
  25. <IfModule mod_headers.c>
  26. Header always set X-Content-Type-Options "nosniff"
  27. </IfModule>
  28.  
  29. ## Can be commented out if causes errors, see notes above.
  30. Options +FollowSymlinks
  31. Options -Indexes
  32.  
  33. ## Mod_rewrite in use.
  34.  
  35. RewriteEngine On
  36.  
  37. ## Begin - Rewrite rules to block out some common exploits.
  38. # If you experience problems on your site then comment out the operations listed
  39. # below by adding a # to the beginning of the line.
  40. # This attempts to block the most common type of exploit `attempts` on Joomla!
  41. #
  42. # Block any script trying to base64_encode data within the URL.
  43. RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
  44. # Block any script that includes a <script> tag in URL.
  45. RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
  46. # Block any script trying to set a PHP GLOBALS variable via URL.
  47. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  48. # Block any script trying to modify a _REQUEST variable via URL.
  49. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  50. # Return 403 Forbidden header and show the content of the root home page
  51. RewriteRule .* index.php [F]
  52. #
  53. ## End - Rewrite rules to block out some common exploits.
  54.  
  55. ## Begin - Custom redirects
  56. #
  57. # If you need to redirect some pages, or set a canonical non-www to
  58. # www redirect (or vice versa), place that code here. Ensure those
  59. # redirects use the correct RewriteRule syntax and the [R=301,L] flags.
  60. #
  61. ## End - Custom redirects
  62.  
  63. ##
  64. # Uncomment the following line if your webserver's URL
  65. # is not directly related to physical file paths.
  66. # Update Your Joomla! Directory (just / for root).
  67. ##
  68.  
  69. # RewriteBase /
  70.  
  71. ## Begin - Joomla! core SEF Section.
  72. #
  73. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  74. #
  75. # If the requested path and file is not /index.php and the request
  76. # has not already been internally rewritten to the index.php script
  77. RewriteCond %{REQUEST_URI} !^/index\.php
  78. # and the requested path and file doesn't directly match a physical file
  79. RewriteCond %{REQUEST_FILENAME} !-f
  80. # and the requested path and file doesn't directly match a physical folder
  81. RewriteCond %{REQUEST_FILENAME} !-d
  82. # internally rewrite the request to the index.php script
  83. RewriteRule .* index.php [L]
  84. #
  85. ## End - Joomla! core SEF Section.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top