Skip to content

ddliu/normurl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

normurl

Normalize URL.

Features

  • Resolve relative URL
  • Remove anchor
  • Remove dot segment
  • Convert scheme and host name to lower case (TODO)

Installation

composer require ddliu\normurl

Usage

use ddliu\normurl\Url;

echo Url::normalize('../hello/world.html', 'http://example.com/about/index.html');
// http://example.com/hello/world.html

License

MIT

This project is based on url_to_absolute by David R. Nadeau.

About

Normalize URL

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages