@thundersquared/gatsby-plugin-htaccess-redirect

1.0.5 • Public • Published

Travis npm

@thundersquared/gatsby-plugin-htaccess-redirect

Generates meta redirect html files for redirecting on any static file host.

Install

npm install --save gatsby-plugin-htaccess-redirect

or

yarn add gatsby-plugin-htaccess-redirect

How to use

// In your gatsby-config.js
plugins: [
  `gatsby-plugin-htaccess-redirect` // make sure to put last in the array
];

Redirects

You can create redirects using the createRedirect action.

An example:

createRedirect({ fromPath: '/old-url', toPath: '/new-url', isPermanent: true });
createRedirect({ fromPath: '/url', toPath: '/zn-CH/url', Language: 'zn' });

That will generate the following html files:

/old-url/index.html:

<meta http-equiv="refresh" content="0; URL='/new-url/'" />

and

/url/index.html:

<meta http-equiv="refresh" content="0; URL='/zn-CH/url/'" />

Readme

Keywords

Package Sidebar

Install

npm i @thundersquared/gatsby-plugin-htaccess-redirect

Weekly Downloads

1

Version

1.0.5

License

MIT

Unpacked Size

7.05 kB

Total Files

5

Last publish

Collaborators

  • anatoli