1.0.5 • Published 4 years ago

@thundersquared/gatsby-plugin-htaccess-redirect v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

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/'" />
1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago