.htaccess 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine On
  3. ## Begin RewriteBase
  4. # If you are getting 500 or 404 errors on subpages, you may have to uncomment the RewriteBase entry
  5. # You should change the '/' to your appropriate subfolder. For example if you have
  6. # your Grav install at the root of your site '/' should work, else it might be something
  7. # along the lines of: RewriteBase /<your_sub_folder>
  8. ##
  9. RewriteBase /
  10. ## End - RewriteBase
  11. ## Begin - X-Forwarded-Proto
  12. # In some hosted or load balanced environments, SSL negotiation happens upstream.
  13. # In order for Grav to recognize the connection as secure, you need to uncomment
  14. # the following lines.
  15. #
  16. # RewriteCond %{HTTP:X-Forwarded-Proto} https
  17. # RewriteRule .* - [E=HTTPS:on]
  18. #
  19. ## End - X-Forwarded-Proto
  20. ## Begin - Exploits
  21. # If you experience problems on your site block out the operations listed below
  22. # This attempts to block the most common type of exploit `attempts` to Grav
  23. #
  24. # Block out any script trying to base64_encode data within the 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)([^s]*s)+cript.*(>|%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. # Return 403 Forbidden header and show the content of the root homepage
  33. RewriteRule .* index.php [F]
  34. #
  35. ## End - Exploits
  36. ## Begin - Index
  37. # If the requested path and file is not /index.php and the request
  38. # has not already been internally rewritten to the index.php script
  39. RewriteCond %{REQUEST_URI} !^/index\.php
  40. # and the requested path and file doesn't directly match a physical file
  41. RewriteCond %{REQUEST_FILENAME} !-f
  42. # and the requested path and file doesn't directly match a physical folder
  43. RewriteCond %{REQUEST_FILENAME} !-d
  44. # internally rewrite the request to the index.php script
  45. RewriteRule .* index.php [L]
  46. ## End - Index
  47. ## Begin - Security
  48. # Block all direct access for these folders
  49. RewriteRule ^(\.git|cache|bin|logs|backup|webserver-configs|tests)/(.*) error [F]
  50. # Block access to specific file types for these system folders
  51. RewriteRule ^(system|vendor)/(.*)\.(txt|xml|md|html|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
  52. # Block access to specific file types for these user folders
  53. RewriteRule ^(user)/(.*)\.(txt|md|yaml|yml|php|pl|py|cgi|twig|sh|bat)$ error [F]
  54. # Block all direct access to .md files:
  55. RewriteRule \.md$ error [F]
  56. # Block all direct access to files and folders beginning with a dot
  57. RewriteRule (^|/)\.(?!well-known) - [F]
  58. # Block access to specific files in the root folder
  59. RewriteRule ^(LICENSE\.txt|composer\.lock|composer\.json|\.htaccess)$ error [F]
  60. ## End - Security
  61. </IfModule>
  62. # Begin - Prevent Browsing and Set Default Resources
  63. Options -Indexes
  64. DirectoryIndex index.php index.html index.htm
  65. # End - Prevent Browsing and Set Default Resources
  66. ## MISE EN CACHE DU NAVIGATEUR ##
  67. # UN AN POUR LES IMAGES
  68. <filesMatch ".(jpg|jpeg|png|gif|ico)$">
  69. Header set Cache-Control "max-age=31536000, public"
  70. </filesMatch>
  71. # UN MOIS POUR LES SCRIPTS
  72. <filesMatch ".(css|js)$">
  73. Header set Cache-Control "max-age=2628000, public"
  74. </filesMatch>
  75. RewriteEngine On
  76. RewriteRule ^contacts\.html$ /qui-sommes-nous/le-campus [R=301,L]
  77. RewriteRule ^la-journee-pedagogique-de-la-petite-enfance\.html$ /agenda [R=301,L]
  78. RewriteRule ^stage-plantes-aromatiques-et-medicinales\.html$ /agenda/stage-plantes-aromatiques-and-medicinales [R=301,L]
  79. RewriteRule ^prestations\.html$ /organisez-vos-evenements/salles [R=301,L]
  80. RewriteRule ^equipements\.html$ /organisez-vos-evenements/salles [R=301,L]
  81. RewriteRule ^inauguration-de-la-salle-drome-vendredi-27-avril-2018\.html$ /agenda [R=301,L]
  82. RewriteRule ^les-visites-d-etudes\.html$ /organisez-vos-evenements/team-building [R=301,L]
  83. RewriteRule ^les-controverses\.html$ /agenda [R=301,L]
  84. RewriteRule ^nos-references\.html$ / [R=301,L]
  85. RewriteRule ^l-ecosite\.html$ / [R=301,L]
  86. RewriteRule ^acces-au-campus\.html$ / [R=301,L]
  87. RewriteRule ^les-partenariats\.html$ / [R=301,L]
  88. RewriteRule ^mentions-legales\.html$ /mentions-legales [R=301,L]
  89. RewriteRule ^le-val-de-drome\.html$ / [R=301,L]
  90. RewriteRule ^biovallee-le-campus\.html$ / [R=301,L]
  91. RewriteRule ^acces\.html$ /qui-sommes-nous/plan-dacces [R=301,L]
  92. RewriteRule ^contactez-nous\.html$ /qui-sommes-nous/plan-dacces [R=301,L]
  93. RewriteRule ^politique-daccessibilite\.html$ /mentions-legales [R=301,L]
  94. RewriteRule ^stage-aromatherapie-theorie-et-pratique-des-huiles-essentielles\.html$ /agenda/stage-aromatherapie-theorie-and-pratique-des-huiles-essentielles [R=301,L]
  95. RewriteRule ^\?page_publication=2$ / [R=301,L]
  96. RewriteRule ^\?page_publication=3$ / [R=301,L]
  97. RewriteRule ^espace-presse\.html$ / [R=301,L]
  98. RewriteRule ^les-controverses-un-debat-avec-michel-hery-et-philippe-fremeaux-sur-les-evolutions-du-monde-du-travail-face-a-la-numerisation\.html$ /archive [R=301,L]
  99. RewriteRule ^credits\.html$ /credits [R=301,L]
  100. RewriteRule ^ca-sest-passe-au-campus\.html$ /archive [R=301,L]
  101. RewriteRule ^la-biovallee\.html$ / [R=301,L]
  102. RewriteRule ^les-materiels-pedagogiques-adaptes-les-logiciels-et-outils-pour-les-dys\.html$ /archive [R=301,L]
  103. RewriteRule ^ca-se-passe-au-campus\.html$ /archive [R=301,L]
  104. RewriteRule ^les-controverses-du-campus-jeudi-4-mai-2017-pourquoi-legalite-est-meilleure-pour-tous\.html$ /archive [R=301,L]
  105. RewriteRule ^notre-democratie-est-elle-aussi-malade-quon-le-dit\.html$ /archive [R=301,L]
  106. RewriteRule ^formation-mieux-communiquer-pour-mieux-cooperer\.html$ /archive [R=301,L]
  107. RewriteRule ^reseau-entreprendre-fetes-des-membres\.html$ /agenda/reseau-entreprendre-fetes-des-membres [R=301,L]
  108. RewriteRule ^une-soiree-en-hommage-a-jean-marie-pelt-a-biovallee-le-campus\.html$ /archive [R=301,L]
  109. RewriteRule ^decouvrir\.html$ / [R=301,L]
  110. RewriteRule ^biovallee-territoire-ecole\.html$ / [R=301,L]
  111. RewriteRule ^retour-sur-la-soiree-cooperer-et-creer-en-biovallee-8-mars-2018\.html$ /archive [R=301,L]
  112. RewriteRule ^les-controverses-du-campus-le-modele-social-francais\.-faut-il-le-changer-le-casser-le-sauver\.html$ /archive [R=301,L]
  113. RewriteRule ^stage-sante-aliments-microbiote\.html$ /agenda/stage-sante-aliments-microbiote [R=301,L]
  114. RewriteRule ^conversations-carbone\.html$ /archive [R=301,L]
  115. RewriteRule ^le-materiel\.html$ /organisez-vos-evenements/salles [R=301,L]
  116. RewriteRule ^les-salles\.html$ /organisez-vos-evenements/salles [R=301,L]
  117. RewriteRule ^compostage-collectif-sur-le-territoire-temoignages-croises-sur-lantenne-de-rdwa\.html$ /agenda/compostage-collectif-sur-le-territoire-temoignages-croises-sur-l%27antenne-de-rdwa [R=301,L]
  118. RewriteRule ^les-controverses-du-campus-vive-la-croissance-oui-mais-laquelle-pourquoi-et-pour-qui\.html$ /archive [R=301,L]
  119. RewriteRule ^louis-gallois-presente-un-territoire-zero-chomeur-de-longue-duree\.html$ /archive [R=301,L]
  120. RewriteRule ^le-1er-petit-dejeuner-du-developpement-durable-organise-par-lassociation-des-acteurs-de-biovallee\.html$ /agenda/le_1er_petit_dejeuner_du_developpement_durable [R=301,L]
  121. RewriteRule ^organiser\.html$ /organisez-vos-evenements/salles [R=301,L]
  122. RewriteRule ^la-ccvd-signe-une-convention-de-partenariat-avec-la-communaute-universite-grenoble-alpes\.html$ /archive [R=301,L]
  123. RewriteRule ^ca-sest-passe-au-campus\.html\?page_actu=2$ /archive [R=301,L]
  124. RewriteRule ^ca-sest-passe-au-campus\.html\?page_actu=3$ /archive [R=301,L]
  125. RewriteRule ^48-stagiaires-en-creationreprise-dentreprises-accueillis-a-lhotel-de-formation-biovallee-le-campus\.html$ /archive [R=301,L]
  126. RewriteRule ^la-fol-26-fete-ses-90-ans-sur-lecosite-du-val-de-drome\.html$ /archive [R=301,L]
  127. RewriteRule ^partenariat-avec-la-communaute-universite-grenoble-alpes\.html$ /archive [R=301,L]
  128. RewriteRule ^deux-journalistes-recompensees-par-le-club-de-la-presse\.html$ /archive [R=301,L]
  129. RewriteRule ^cirh3\.html$ /archive [R=301,L]
  130. RewriteRule ^seminaire-plan-national-dactions-en-faveur-de-lapron-du-rhone-bilan-de-5-annees-de-travail\.html$ /archive [R=301,L]
  131. RewriteRule ^jean-jouzel-un-prix-nobel-en-biovallee-15-juin-2017\.html$ /archive [R=301,L]
  132. RewriteRule ^40-chefs-dentreprises-developpent-du-chiffre-daffaires-a-biovallee-le-campus\.html$ /archive [R=301,L]
  133. RewriteRule ^la-lpo-coordination-auvergne-rhone-alpes-en-biovallee-pour-son-assemblee-generale-24-juin-2017\.html$ /agenda/la-lpo-coordination-auvergne-rhone-alpes-en-biovallee-pour-son-assemblee-generale-24-juin-2017 [R=301,L]
  134. RewriteRule ^economie-ca-bouge-pas-mal-2\.html$ /archive [R=301,L]
  135. RewriteRule ^le-pole-agro-ecologique-en-biovallee-forme-de-jeunes-agriculteurs-22-juin-2017\.html$ /archive [R=301,L]
  136. RewriteRule ^de-la-musique-a-la-citoyennete-un-orchestre-a-lecole\.html$ /agenda/de-la-musique-a-la-citoyennete-un-orchestre-a-lecole [R=301,L]