Added .htaccess

This commit is contained in:
Jesús 2019-09-23 23:17:00 -05:00
parent 2dcae1179c
commit 78b9504457
No known key found for this signature in database
GPG Key ID: F6EE7BC59A315766
2 changed files with 41 additions and 1 deletions

40
content/.htaccess Normal file
View File

@ -0,0 +1,40 @@
# Extra Security Headers
<IfModule mod_headers.c>
Header set X-XSS-Protection "1; mode=block"
Header always append X-Frame-Options SAMEORIGIN
Header set X-Content-Type-Options nosniff
# DISABLE CACHING
# Header set Cache-Control "no-cache, no-store, must-revalidate"
# Header set Pragma "no-cache"
# Header set Expires 0
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
# Rewrite HTTP to HTTPS
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*) https://%{SERVER_NAME}/$1 [R,L]
</IfModule>
ErrorDocument 404 /404.html
# BEGIN EXPIRES
<IfModule mod_expires.c>
ExpiresActive On
ExpiresByType text/plain "access plus 1 minute"
ExpiresByType text/vtt "access plus 1 year"
ExpiresByType text/css "access plus 1 year"
ExpiresByType image/jpg "access plus 1 year"
ExpiresByType image/jpeg "access plus 1 year"
ExpiresByType image/gif "access plus 1 year"
ExpiresByType image/png "access plus 1 year"
ExpiresByType text/html "access plus 600 seconds"
ExpiresDefault "access plus 1 year"
</IfModule>
# END EXPIRES

View File

@ -49,7 +49,7 @@ AUTHORS_URL = 'pages/créditos/'
AUTHORS_SAVE_AS = 'pages/créditos/index.html' AUTHORS_SAVE_AS = 'pages/créditos/index.html'
ARCHIVES_URL = 'archives/' ARCHIVES_URL = 'archives/'
ARCHIVES_SAVE_AS = 'archives/index.html' ARCHIVES_SAVE_AS = 'archives/index.html'
STATIC_PATHS = ['asciicasts', 'heckyel_pub.asc', 'robots.txt', 'wp-content', 'vendor'] STATIC_PATHS = ['.htaccess', 'asciicasts', 'heckyel_pub.asc', 'robots.txt', 'wp-content', 'vendor']
PAGE_EXCLUDES = ['asciicasts', 'wp-content', 'vendor'] PAGE_EXCLUDES = ['asciicasts', 'wp-content', 'vendor']
ARTICLE_EXCLUDES = ['asciicasts', 'wp-content', 'vendor'] ARTICLE_EXCLUDES = ['asciicasts', 'wp-content', 'vendor']