diff --git a/README.md b/README.md new file mode 100644 index 0000000..2f8d93c --- /dev/null +++ b/README.md @@ -0,0 +1,31 @@ +# Redirectoperators + +Operators for performing URL redirect from within a template. The operators will send an HTTP header 301. + +- `redirectabsolute` +- `redirectrelative` + +## Installation +Install with Composer: + +``` +composer require aplia/redirectoperators +``` + +## Usage +From within a template, write: +``` +{redirectrelative( '' )} +``` +for instance: +``` +{redirectrelative( '/path/to/file.php' )} +``` +or +``` +{redirectabsolute( '' )} +``` +for instance: +``` +{redirectabsolute( '' )} +``` \ No newline at end of file diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..07b33b7 --- /dev/null +++ b/composer.json @@ -0,0 +1,15 @@ +{ + "name": "aplia/redirectoperators", + "description": "Operators for performing URL redirect from within a template.", + "keywords": ["ezextension", "redirect", "operator"], + "homepage": "https://github.com/Aplia/redirectoperators", + "type": "ezpublish-legacy-extension", + "license": "GPL-2.0", + "extra": { + "ezpublish-legacy-extension-name": "redirectoperators" + }, + "require": { + "php": ">=5.3", + "composer/composer": ">=1.0" + } +} \ No newline at end of file