Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Customize the ErrorDocument #8

Closed
mschel opened this issue Dec 2, 2019 · 4 comments
Closed

Customize the ErrorDocument #8

mschel opened this issue Dec 2, 2019 · 4 comments

Comments

@mschel
Copy link

mschel commented Dec 2, 2019

First - great plugin!

Is there a way to customize the ErrorDocument path?

Thanks

@AndreasFaust
Copy link
Owner

You can specify this by using the custom-option:

module.exports = {
  plugins: [
    {
      resolve: 'gatsby-plugin-htaccess',
      options: {
        custom: `
            ErrorDocument 404 /path/to/404.html
        `,
      },
    },
  ],
}

@mschel
Copy link
Author

mschel commented Dec 2, 2019

Already tried - this will add another ErrorDocument Definition at the End of the .htaccess File. Or is the last entry overriding the previous one by .htaccess Definition?

@AndreasFaust
Copy link
Owner

AndreasFaust commented Dec 2, 2019

I've just added the option ErrorDocument. Update to version 1.3.1 and take a look at the readme.md.
If everything works and you want to do me a favour: Star this library!

@mschel
Copy link
Author

mschel commented Dec 2, 2019

works like a charm! Thanks

@mschel mschel closed this as completed Dec 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants