Lokka(http://lokka.org) plugin that can creates redirect rules. Useful for migrating from WordPress to Lokka.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/lokka
views/rules
README.md

README.md

Lokka "Redirect" Plugin

This plugin is for the website using Lokka deployed on Heroku. The plugin can create any redirect rule. For example, this is useful for migrating from WordPress to Lokka, in case that you want to redirect URLs of WP style to those of Lokka style.

Installation

$ cd LOKKA_ROOT/public/plugin
$ git clone git@github.com:champierre/lokka-redirect.git
$ rm -rf lokka-redirect/.git

Usage

If you want to redirect

http://example.com/archives/date/2007/11/

to

http://example.com/2007/11/

create the following rule from "rewrite" plugin admin page.

Pattern Substitution
^/archives/date/(\d{4})/(\d{2})/*$ /\1/\2/

Examples of Redirect Rules

Pattern Substitution
^/archives/(\d+)/*$ /\1
^/archives/date/(\d{4})/(\d{2})/*$ /\1/\2/
^/archives/date/(\d{4})/*$ /\1/