Skip to content

yidas/php-uri

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

php URI

URL Standardized Redirector with Customized Setting for SEO

Latest Stable Version Latest Unstable Version License


DEMONSTRATION

yidas\uri\Seo::trailingSlash(false)->removeIndex();

REQUIREMENTS

This library requires the following:

  • PHP 5.4.0+

INSTALLATION

Run Composer in your project:

composer require yidas/uri

COMPONENTS

Seo

yidas\uri\Seo is a helper to handle URI for SEO, you could customized set rules in your application, then it will redirect to correct URI if the current URI is not match your expectation.

The usage methods are following:

trailingSlash()

Trailing Slash Handler, by default it always redirect to uri with last slash.

https://www.domain.com/about/   (Switch On)
https://www.domain.com/about    (Switch Off)

For example:

yidas\uri\Seo::trailingSlash(false);
// https://www.domain.com/about/ => https://www.domain.com/about

removeIndex()

Most framework allows index action could be accessed by root URI of controller, this makes that way only.

For example, https://www.domain.com/about/index/ to https://www.domain.com/about/.

About

URL Standardized Re-director with Customized Setting for SEO

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages