1. AuthType Basic
  2. AuthName "restricted area"
  3. AuthUserFile /private/.htpass
  4. require valid-user
  5. php_value date.timezone "Europe/Amsterdam"
  6. php_value upload_max_filesize 200M
  7. php_value post_max_size 200M
  8. <Files *.ss>
  9. Order deny,allow
  10. Deny from all
  11. Allow from 127.0.0.1
  12. </Files>
  13. <Files web.config>
  14. Order deny,allow
  15. Deny from all
  16. </Files>
  17. ErrorDocument 404 /assets/error-404.html
  18. ErrorDocument 500 /assets/error-500.html
  19. <IfModule mod_alias.c>
  20. RedirectMatch 403 /silverstripe-cache(/|$)
  21. RedirectMatch 403 /vendor(/|$)
  22. RedirectMatch 403 /composer\.(json|lock)
  23. </IfModule>
  24. <IfModule mod_rewrite.c>
  25. SetEnv HTTP_MOD_REWRITE On
  26. Options -MultiViews
  27. RewriteEngine On
  28. RewriteBase /test/
  29. RewriteCond %{REQUEST_URI} ^(.*)$
  30. RewriteCond %{REQUEST_FILENAME} !-f
  31. RewriteCond %{REQUEST_URI} !^/private/.*$
  32. RewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
  33. RewriteCond %{HTTP_COOKIE} HTTP_IS_RETINA [NC]
  34. RewriteCond %{REQUEST_FILENAME} !@2x
  35. RewriteRule ^(.*)\.(gif|jpg|png)$ $1@2x.$2
  36. # if @2x isn't available fulfill the original request
  37. RewriteCond %{REQUEST_FILENAME} !-f
  38. RewriteRule ^(.*)@2x\.(gif|jpg|png)$ $1.$2
  39. </IfModule>