Guest User

Untitled

a guest
Jan 21st, 2019
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.07 KB | None | 0 0
  1. # Protect files and directories from prying eyes.
  2. <FilesMatch ".(engine|inc|info|install|make|module|profile|test|po|sh|.*sql|theme|tpl(.php)?|xtmpl)$|^(..*|Entries.*|Repository|Root|Tag|Template)$">
  3. Order allow,deny
  4. </FilesMatch>
  5.  
  6. # Don't show directory listings for URLs which map to a directory.
  7. Options -Indexes
  8.  
  9. # Follow symbolic links in this directory.
  10. Options +FollowSymLinks
  11.  
  12. # Multiviews creates problems with aliased URLs and is not needed for Drupal.
  13. Options -Multiviews
  14.  
  15. # Make Drupal handle any 404 errors.
  16. ErrorDocument 404 /index.php
  17.  
  18. # Force simple error message for requests for non-existent favicon.ico.
  19. <Files favicon.ico>
  20. # There is no end quote below, for compatibility with Apache 1.3.
  21. ErrorDocument 404 "The requested file favicon.ico was not found.
  22. </Files>
  23.  
  24. # Set the default handler.
  25. DirectoryIndex index.php index.html index.htm
  26.  
  27. # Override PHP settings that cannot be changed at runtime. See
  28. # sites/default/default.settings.php and drupal_initialize_variables() in
  29. # includes/bootstrap.inc for settings that can be changed at runtime.
  30.  
  31. # PHP 5, Apache 1 and 2.
  32. <IfModule mod_php5.c>
  33. php_flag magic_quotes_gpc off
  34. php_flag magic_quotes_sybase off
  35. php_flag register_globals off
  36. php_flag session.auto_start off
  37. php_value mbstring.http_input pass
  38. php_value mbstring.http_output pass
  39. php_flag mbstring.encoding_translation off
  40. </IfModule>
  41.  
  42. # Requires mod_expires to be enabled.
  43. <IfModule mod_expires.c>
  44. # Enable expirations.
  45. ExpiresActive On
  46.  
  47. # Cache all files for 2 weeks after access (A).
  48. ExpiresDefault A1209600
  49.  
  50. <FilesMatch .php$>
  51. # Do not allow PHP scripts to be cached unless they explicitly send cache
  52. # headers themselves. Otherwise all scripts would have to overwrite the
  53. # headers set by mod_expires if they want another caching behavior. This may
  54. # fail if an error occurs early in the bootstrap process, and it may cause
  55. # problems if a non-Drupal PHP file is installed in a subdirectory.
  56. ExpiresActive Off
  57. </FilesMatch>
  58. </IfModule>
Add Comment
Please, Sign In to add comment