mardy-git / redirect
A simple redirect package.
Installs: 123
Dependents: 0
Suggesters: 0
Security: 0
Watchers: 2
Open Issues: 0
pkg:composer/mardy-git/redirect
Requires
- php: >=5.4
This package is not auto-updated.
Last update: 2015-08-05 08:48:09 UTC
README
A simple redirect package.
Installation
To install this use composer by adding
"mardy-git/redirect": "dev-master"
to your composer.json file
Usage Example
use Mardy\Redirect\Redirect;
$redirect = new Redirect;
//with all options set (You can set your own headers, these are only examples)
$redirect->go(
"http://www.google.com",
Redirect::HTTP_STATUS_302,
[
'Content-Type' => 'text/html; charset=utf-8',
'Connection' => 'keep-alive',
'Expires' => 'Thu, 19 Nov 1981 08:52:00 GMT'
...
...
...
]
);
//with just the URL and status
$redirect->go(
"http://www.google.com",
Redirect::HTTP_STATUS_302
);
//lightweight with just the URL
$redirect->go(
"http://www.google.com"
);