.htaccess 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. # WARNING: For PHP 7 the module name in the line below need to be modified!
  2. <IfModule mod_php5.c>
  3. php_flag display_errors Off
  4. php_flag log_errors On
  5. # php_value error_log logs/errors
  6. php_value upload_max_filesize 5M
  7. php_value post_max_size 6M
  8. php_value memory_limit 64M
  9. php_flag zlib.output_compression Off
  10. php_flag suhosin.session.encrypt Off
  11. #php_value session.cookie_path /
  12. #php_value session.hash_function sha256
  13. php_flag session.auto_start Off
  14. php_value session.gc_maxlifetime 21600
  15. php_value session.gc_divisor 500
  16. php_value session.gc_probability 1
  17. </IfModule>
  18. <IfModule mod_rewrite.c>
  19. Options +SymLinksIfOwnerMatch
  20. RewriteEngine On
  21. RewriteRule ^favicon\.ico$ skins/larry/images/favicon.ico
  22. # security rules:
  23. # - deny access to files not containing a dot or starting with a dot
  24. # in all locations except installer directory
  25. RewriteRule ^(?!installer|\.well-known\/|[a-zA-Z0-9]{16})(\.?[^\.]+)$ - [F]
  26. # - deny access to some locations
  27. RewriteRule ^/?(\.git|\.tx|SQL|bin|config|logs|temp|tests|program\/(include|lib|localization|steps)) - [F]
  28. # - deny access to some documentation files
  29. RewriteRule /?(README\.md|composer\.json-dist|composer\.json|package\.xml|Dockerfile)$ - [F]
  30. </IfModule>
  31. <IfModule mod_deflate.c>
  32. SetOutputFilter DEFLATE
  33. </IfModule>
  34. <IfModule mod_expires.c>
  35. ExpiresActive On
  36. ExpiresDefault "access plus 1 month"
  37. </IfModule>
  38. FileETag MTime Size
  39. <IfModule mod_autoindex.c>
  40. Options -Indexes
  41. </ifModule>
  42. <IfModule mod_headers.c>
  43. # Disable page indexing
  44. Header set X-Robots-Tag "noindex, nofollow"
  45. # replace 'append' with 'merge' for Apache version 2.2.9 and later
  46. #Header append Cache-Control public env=!NO_CACHE
  47. # Optional security header
  48. # Only increased security if the browser support those features
  49. # Be careful! Testing is required! They should be adusted to your intallation / user environment
  50. # HSTS - HTTP Strict Transport Security
  51. #Header always set Strict-Transport-Security "max-age=31536000; preload" env=HTTPS
  52. # HPKP - HTTP Public Key Pinning
  53. # Only template - fill with your values
  54. #Header always set Public-Key-Pins "max-age=3600; report-uri=\"\"; pin-sha256=\"\"; pin-sha256=\"\"" env=HTTPS
  55. # X-Xss-Protection
  56. # This header is used to configure the built in reflective XSS protection found in Internet Explorer, Chrome and Safari (Webkit).
  57. #Header set X-XSS-Protection "1; mode=block"
  58. # X-Frame-Options
  59. # The X-Frame-Options header (RFC), or XFO header, protects your visitors against clickjacking attacks
  60. # Already set by php code! Do not activate both options
  61. #Header set X-Frame-Options SAMEORIGIN
  62. # X-Content-Type-Options
  63. # It prevents Google Chrome and Internet Explorer from trying to mime-sniff the content-type of a response away from the one being declared by the server.
  64. #Header set X-Content-Type-Options: "nosniff"
  65. # CSP - Content Security Policy
  66. # for better privacy/security ask browsers to not set the Referer
  67. # more flags for script, stylesheets and images available, read RFC for more information
  68. #Header set Content-Security-Policy "referrer no-referrer"
  69. </IfModule>