astro-htaccess-manager
v0.0.5
Published
Manage multiple htaccess files for Astro
Maintainers
Readme
Astro HT Access Manager
Plugin for Astro that handles automatic generation of multiple htaccess files.
By default it will:
- Create
/.htaccesswith:- Any redirects defined in your astro config
- Any error code pages e.g.
404.html
- Create
/_astro/.htaccesswhich has a catch all caching rule for 60 days. - Anywhere it finds an error code page e.g.
/blog/404it will create/blog/.htaccessto use that error page instead.
You can then:
- Create any
.htaccessyou need with custom rules. These rules are merged with the existing automatic detection.
Install
astro add astro-htaccess-managerConfigure
astroHtaccessManager({
astroCaching: true
manualFiles: {
'/assets': {
cachingRules: [{type: 'jpg|png', seconds: 84600}]
}
}
cachingRules: [{type: 'jpg|png', seconds: 60}]
})