Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Kirby .htaccess
- # SET CSP HEADER
- <IfModule mod_headers.c>
- Header set Content-Security-Policy "upgrade-insecure-requests"
- </IfModule>
- # HSTS HEADER
- # Recommanded value: 15778800 (half a year)
- Header always set Strict-Transport-Security "max-age=31557600; includeSubDomains; preload"
- # rewrite rules
- <IfModule mod_rewrite.c>
- # enable awesome urls. i.e.:
- # http://yourdomain.com/about-us/team
- RewriteEngine on
- RewriteCond %{SERVER_PORT} 80
- #RewriteRule ^(.*)$ https://www.marcteyssier.com/$1 [R=301,L]
- #RewriteRule ^panel/(.*) https://www.marcteyssier.com/panel/ [R=301,L]
- RewriteBase /
- # block text files in the content folder from being accessed directly
- RewriteRule ^content/(.*)\.(txt|md|mdown)$ index.php [L]
- # block all files in the site folder from being accessed directly
- # except for requests to plugin assets files
- #RewriteRule ^assets/plugins/([a-zA-Z0-9\.\-_%=]+)/(.*)$ site/plugins/$1/assets/$2 [L,N]
- #RewriteCond $1 !^plugins/[a-zA-Z0-9\.\-_%=]+/assets/.*
- RewriteRule ^site/(.*) index.php [L]
- # block all files in the kirby folder from being accessed directly
- RewriteRule ^kirby/(.*) index.php [L]
- # make panel links work
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^panel/(.*) panel/index.php [L]
- # make site links work
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*) index.php [L]
- </IfModule>
- # Additional recommended values
- # Remove comments for those you want to use.
- #
- # AddDefaultCharset UTF-8
- #
- # php_flag short_open_tag on
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement