You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.htaccess 3.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 composer binaries
  29. RewriteRule ^/vendor\/bin\/.* - [F]
  30. # - deny access to some documentation files
  31. RewriteRule /?(README\.md|composer\.json-dist|composer\.json|package\.xml|jsdeps.json|Dockerfile)$ - [F]
  32. </IfModule>
  33. <IfModule mod_deflate.c>
  34. SetOutputFilter DEFLATE
  35. </IfModule>
  36. <IfModule mod_expires.c>
  37. ExpiresActive On
  38. ExpiresDefault "access plus 1 month"
  39. </IfModule>
  40. FileETag MTime Size
  41. <IfModule mod_autoindex.c>
  42. Options -Indexes
  43. </ifModule>
  44. <IfModule mod_headers.c>
  45. # Disable page indexing
  46. Header set X-Robots-Tag "noindex, nofollow"
  47. # replace 'append' with 'merge' for Apache version 2.2.9 and later
  48. #Header append Cache-Control public env=!NO_CACHE
  49. # Optional security header
  50. # Only increased security if the browser support those features
  51. # Be careful! Testing is required! They should be adusted to your intallation / user environment
  52. # HSTS - HTTP Strict Transport Security
  53. #Header always set Strict-Transport-Security "max-age=31536000; preload" env=HTTPS
  54. # HPKP - HTTP Public Key Pinning
  55. # Only template - fill with your values
  56. #Header always set Public-Key-Pins "max-age=3600; report-uri=\"\"; pin-sha256=\"\"; pin-sha256=\"\"" env=HTTPS
  57. # X-Xss-Protection
  58. # This header is used to configure the built in reflective XSS protection found in Internet Explorer, Chrome and Safari (Webkit).
  59. #Header set X-XSS-Protection "1; mode=block"
  60. # X-Frame-Options
  61. # The X-Frame-Options header (RFC), or XFO header, protects your visitors against clickjacking attacks
  62. # Already set by php code! Do not activate both options
  63. #Header set X-Frame-Options SAMEORIGIN
  64. # X-Content-Type-Options
  65. # 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.
  66. #Header set X-Content-Type-Options: "nosniff"
  67. # CSP - Content Security Policy
  68. # for better privacy/security ask browsers to not set the Referer
  69. # more flags for script, stylesheets and images available, read RFC for more information
  70. #Header set Content-Security-Policy "referrer no-referrer"
  71. </IfModule>