Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.89 KB | None | 0 0
  1. #
  2. #####################################################
  3.  
  4. ## Can be commented out if causes errors, see notes above.
  5. Options +FollowSymLinks
  6.  
  7. #
  8. # mod_rewrite in use
  9.  
  10. RewriteEngine On
  11.  
  12. ########## Begin - Rewrite rules to block out some common exploits
  13. ## If you experience problems on your site block out the operations listed below
  14. ## This attempts to block the most common type of exploit `attempts` to Joomla!
  15. #
  16. ## Deny access to extension xml files (uncomment out to activate)
  17. #<Files ~ "\.xml$">
  18. #Order allow,deny
  19. #Deny from all
  20. #Satisfy all
  21. #</Files>
  22. ## End of deny access to extension xml files
  23. RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
  24. # Block out any script trying to base64_encode crap to send via URL
  25. RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [OR]
  26. # Block out any script that includes a <script> tag in URL
  27. RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]
  28. # Block out any script trying to set a PHP GLOBALS variable via URL
  29. RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
  30. # Block out any script trying to modify a _REQUEST variable via URL
  31. RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
  32. # Send all blocked request to homepage with 403 Forbidden error!
  33. RewriteRule ^(.*)$ index.php [F,L]
  34. #
  35. ########## End - Rewrite rules to block out some common exploits
  36.  
  37. # Uncomment following line if your webserver's URL
  38. # is not directly related to physical file paths.
  39. # Update Your Joomla! Directory (just / for root)
  40.  
  41. # RewriteBase /
  42.  
  43.  
  44. ########## Begin - Joomla! core SEF Section
  45. #
  46. RewriteCond %{REQUEST_FILENAME} !-f
  47. RewriteCond %{REQUEST_FILENAME} !-d
  48. RewriteCond %{REQUEST_URI} !^/index.php
  49. RewriteCond %{REQUEST_URI} (/|\.php|\.html|\.htm|\.feed|\.pdf|\.raw|/[^.]*)$ [NC]
  50. RewriteRule (.*) index.php
  51. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  52. #
  53. ########## End - Joomla! core SEF Section
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement