Advertisement
Guest User

Untitled

a guest
Jul 8th, 2020
289
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.17 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. RewriteEngine on
  3.  
  4. #RewriteBase /shopware/
  5.  
  6. # Https config for the backend
  7. RewriteCond %{HTTPS} !=on
  8. RewriteRule backend/(.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
  9.  
  10. RewriteCond %{SERVER_PORT} !^443$
  11. RewriteRule (.*) https://%{HTTP_HOST}/$1 [R=301,L]
  12.  
  13. RewriteRule shopware.dll shopware.php
  14. RewriteRule files/documents/.* engine [NC,L]
  15. RewriteRule backend/media/(.*) media/$1 [NC,L]
  16.  
  17. RewriteCond %{REQUEST_URI} !(\/(engine|files|templates|themes|web)\/)
  18. RewriteCond %{REQUEST_URI} !(\/media\/(archive|banner|image|music|pdf|unknown|video)\/)
  19. RewriteCond %{REQUEST_FILENAME} !-f
  20. RewriteCond %{REQUEST_FILENAME} !-d
  21. RewriteRule ^(.*)$ shopware.php [PT,L,QSA]
  22.  
  23. # Fix missing authorization-header on fast_cgi installations
  24. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  25. </IfModule>
  26.  
  27. <IfModule mod_alias.c>
  28. # Block access to VCS directories
  29. RedirectMatch 404 /\\.(svn|git|hg|bzr|cvs)(/|$)
  30.  
  31. # Restrict access to root folder files
  32. RedirectMatch 404 /(composer\.(json|lock)|README\.md|UPGRADE\.md)$
  33. </IfModule>
  34.  
  35. # Staging environment
  36. #SetEnvIf Host "staging.test.shopware.in" SHOPWARE_ENV=staging
  37.  
  38. # Development environment
  39. #SetEnvIf Host "dev.shopware.in" SHOPWARE_ENV=dev
  40. #SetEnv SHOPWARE_ENV dev
  41.  
  42. DirectoryIndex index.html
  43. DirectoryIndex index.php
  44. DirectoryIndex shopware.php
  45.  
  46. # Disables download of configuration
  47. <Files ~ "\.(tpl|yml|ini)$">
  48. # Deny all requests from Apache 2.4+.
  49. <IfModule mod_authz_core.c>
  50. Require all denied
  51. </IfModule>
  52.  
  53. # Deny all requests from Apache 2.0-2.2.
  54. <IfModule !mod_authz_core.c>
  55. Deny from all
  56. </IfModule>
  57. </Files>
  58.  
  59. # Enable gzip compression
  60. <IfModule mod_deflate.c>
  61. AddOutputFilterByType DEFLATE text/html text/xml text/plain text/css text/javascript application/javascript application/json
  62. </IfModule>
  63.  
  64. <Files ~ "\.(jpe?g|png|gif|css|js|woff|eot)$">
  65. <IfModule mod_expires.c>
  66. ExpiresActive on
  67. ExpiresDefault "access plus 1 month"
  68. </IfModule>
  69.  
  70. <IfModule mod_headers.c>
  71. Header append Cache-Control "public"
  72. Header unset ETag
  73. </IfModule>
  74.  
  75. FileETag None
  76. </Files>
  77.  
  78. # Match generated files like:
  79. # 1429684458_t22_s1.css
  80. # 1429684458_t22_s1.js
  81. <FilesMatch "([0-9]{10})_(.+)\.(js|css)$">
  82. <ifModule mod_headers.c>
  83. Header set Cache-Control "max-age=31536000, public"
  84. </ifModule>
  85.  
  86. <IfModule mod_expires.c>
  87. ExpiresActive on
  88. ExpiresDefault "access plus 1 year"
  89. </IfModule>
  90. </FilesMatch>
  91.  
  92. # Disables auto directory index
  93. <IfModule mod_autoindex.c>
  94. Options -Indexes
  95. </IfModule>
  96.  
  97. <IfModule mod_negotiation.c>
  98. Options -MultiViews
  99. </IfModule>
  100.  
  101. <IfModule mod_php5.c>
  102. # #php_value memory_limit 256M
  103. # #php_value max_execution_time 120
  104. # #php_value upload_max_filesize 20M
  105. #php_flag phar.readonly off
  106. #php_flag magic_quotes_gpc off
  107. #php_flag session.auto_start off
  108. #php_flag suhosin.session.cryptua off
  109. #php_flag zend.ze1_compatibility_mode off
  110. </IfModule>
  111.  
  112. # AddType x-mapp-php5 .php
  113. # AddHandler x-mapp-php5 .php
  114.  
  115. <IfModule mod_headers.c>
  116. Header append X-Frame-Options SAMEORIGIN
  117. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement