pixelbrackets / html-redirect
Generate HTML markup to redirect a request instead of sending a location header
Requires (Dev)
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2024-11-07 01:54:35 UTC
README
Generate HTML markup to redirect a request instead of sending a location header.
Vision
The package provides valid HTML markup to redirect a request to another location.
The redirect method is an alternative for generating static sites which may not use a location header.
See »Usage« for an example.
The package follows the KISS principle.
Requirements
- PHP
Installation
Packagist Entry https://packagist.org/packages/pixelbrackets/html-redirect/
Source
https://gitlab.com/pixelbrackets/html-redirect/
Mirror https://github.com/pixelbrackets/html-redirect/
Demo
Usage
- Get the markup to redirect to
https://example.com
and write to file$redirectMarkup = \Pixelbrackets\HtmlRedirect\HtmlRedirect::redirect('https://example.com/'); file_put_contents('/var/www/example/index.html', $redirectMarkup);
The package creates the markup only, you need to write files or create PSR-7 responses by yourself.
License
GNU General Public License version 2 or later
The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html.
Author
Dan Untenzu (mail@pixelbrackets.de / @pixelbrackets)
Changelog
See ./CHANGELOG.md
Contribution
This script is Open Source, so please use, patch, extend or fork it.
Contributions are welcome!