mikemonteith / wheatdirect

Redirect web traffic based on some basic rules

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

WheatDirect

Redirect http traffic based on configurable rules.

Usage

Update the rules in config.yml.

Changes to the master branch will be deployed to https://nhsuk-survey.surge.sh

Rules

Percentage

Redirect traffic randomly, weighted by a chance value.

- type: percentage
  values:
    - chance: 20
      url: https://example.com#20-percent-of-traffic
    - chance: 80
      url: https://example.com#80-percent-of-traffic

Width

Redirect traffic based on device width.

Handles mobile, tablet and desktop.

- type: width
  values:
    - device: mobile
      url: https://example.com#mobile-traffic
    - device: tablet
      url: https://example.com#tablet-traffic
    - device: desktop
      url: https://example.com#desktop-traffic

Why "WheatDirect"?

This app was inspired by a request from @ashleyjwheat.

About

Redirect web traffic based on some basic rules


Languages

Language:JavaScript 93.8%Language:HTML 6.2%