codesignd website at codesignd.com/codesignd.de
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 2.8KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. # Rewrite rules
  2. <IfModule mod_rewrite.c>
  3. # enable awesome urls. i.e.:
  4. # http://yourdomain.com/about-us/team
  5. RewriteEngine on
  6. # make sure to set the RewriteBase correctly
  7. # if you are running the site in a subfolder.
  8. # Otherwise links or the entire site will break.
  9. #
  10. # If your homepage is http://yourdomain.com/mysite
  11. # Set the RewriteBase to:
  12. #
  13. RewriteBase /
  14. # enforce HTTPS
  15. RewriteCond %{ENV:HTTPS} !=on
  16. RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
  17. # rewrite /favicon.ico
  18. RewriteRule ^favicon.ico$ assets/img/favicon.ico [L]
  19. # cache busting
  20. RewriteCond %{REQUEST_FILENAME} !-f
  21. RewriteRule ^(assets/.+)\.(\d+)\.(\w+)$ $1.$3 [L]
  22. # block text files in the content folder from being accessed directly
  23. RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
  24. # block all files in the site folder from being accessed directly
  25. RewriteRule ^site/(.*) index.php [L]
  26. # block all files in the kirby folder from being accessed directly
  27. RewriteRule ^kirby/(.*) index.php [L]
  28. # make panel links work
  29. RewriteCond %{REQUEST_FILENAME} !-f
  30. RewriteCond %{REQUEST_FILENAME} !-d
  31. RewriteRule ^panel/(.*) panel/index.php [L]
  32. # make site links work
  33. RewriteCond %{REQUEST_FILENAME} !-f
  34. RewriteCond %{REQUEST_FILENAME} !-d
  35. RewriteRule ^(.*) index.php [L]
  36. </IfModule>
  37. # Mime types
  38. <IfModule mod_mime.c>
  39. AddType text/css css
  40. AddType application/javascript js
  41. AddType image/svg+xml svg
  42. AddType image/jpeg jpg jpeg
  43. AddType image/png png
  44. AddType image/x-icon ico
  45. AddType application/vnd.ms-fontobject eot
  46. AddType application/font-woff woff
  47. AddType font/woff2 woff2
  48. AddType application/pgp-keys asc
  49. </IfModule>
  50. # Compression
  51. <IfModule mod_deflate.c>
  52. AddOutputFilterByType DEFLATE application/atom+xml \
  53. application/javascript \
  54. application/json \
  55. application/rss+xml \
  56. application/xhtml+xml \
  57. application/xml \
  58. image/svg+xml \
  59. image/x-icon \
  60. text/cache-manifest \
  61. text/css \
  62. text/html \
  63. text/plain
  64. </IfModule>
  65. # Caching
  66. <IfModule mod_expires.c>
  67. ExpiresActive On
  68. ExpiresByType text/css "modification plus 1 year"
  69. ExpiresByType application/javascript "modification plus 1 year"
  70. ExpiresByType image/svg+xml "modification plus 1 year"
  71. ExpiresByType image/jpeg "modification plus 1 year"
  72. ExpiresByType image/png "modification plus 1 year"
  73. ExpiresByType image/x-icon "modification plus 1 year"
  74. ExpiresByType application/vnd.ms-fontobject "modification plus 1 year"
  75. ExpiresByType application/font-woff "modification plus 1 year"
  76. ExpiresByType font/woff2 "modification plus 1 year"
  77. </IfModule>