Normalize URL.
- Resolve relative URL
- Remove anchor
- Remove dot segment
- Convert scheme and host name to lower case (TODO)
composer require ddliu\normurl
use ddliu\normurl\Url;
echo Url::normalize('../hello/world.html', 'http://example.com/about/index.html');
// http://example.com/hello/world.html
MIT
This project is based on url_to_absolute by David R. Nadeau.