php URI
URL Standardized Redirector with Customized Setting for SEO, (*1)
, (*2)
DEMONSTRATION
yidas\uri\Seo::trailingSlash(false)->removeIndex();
REQUIREMENTS
This library requires the following:, (*3)
INSTALLATION
Run Composer in your project:, (*4)
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., (*5)
The usage methods are following:, (*6)
trailingSlash()
Trailing Slash Handler, by default it always redirect to uri with last slash., (*7)
https://www.domain.com/about/ (Switch On)
https://www.domain.com/about (Switch Off)
For example:, (*8)
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., (*9)
For example, https://www.domain.com/about/index/
to https://www.domain.com/about/
., (*10)