webino / webino-canonical-redirect
URI Canonicalizer for Zend Framework 2
Installs: 12 357
Dependents: 0
Suggesters: 0
Security: 0
Stars: 7
Watchers: 3
Forks: 2
Open Issues: 0
Requires
- php: >=5.3.3
- zendframework/zend-stdlib: 2.*
- zendframework/zend-uri: 2.*
Requires (Dev)
- apigen/apigen: 2.*
- mayflower/php-codebrowser: *
- pdepend/pdepend: 1.*
- phploc/phploc: *
- phpmd/phpmd: 1.*
- phpunit/phpunit: 3.7.*
- satooshi/php-coveralls: 0.*
- sebastian/phpcpd: *
- squizlabs/php_codesniffer: 1.*
- webino/zf2nette-debug: 1.*
- zendframework/zendframework: 2.*
Suggests
- zendframework/zend-modulemanager: To use it as a Zend Framework module
- zendframework/zend-mvc: For URI canonicalization on application bootstrap
This package is auto-updated.
Last update: 2024-12-04 23:22:43 UTC
README
Allows you to configure www and trailing slash of your web site canonical URI. If wrong URI format is provided redirects to the canonicalized URI with HTTP 301.
If you can't or don't know how to configure your web server rewrites to handle URI duplicate content, this module is the smart solution.
Features
- Redirects
..domain.tld/index.php
to..domain.tld
- Configure site to use www
www.domain.tld
or notdomain.tld
- Configure site to use trailing slash
..domain.tld/something/
or not..domain.tld/something
Setup
Following steps are necessary to get this module working, considering a zf2-skeleton or very similar application:
- Run:
php composer.phar require webino/webino-canonical-redirect:dev-develop
- Add
WebinoCanonicalRedirect
to the enabled modules list
QuickStart
Copy, paste & override following settings to your configuration:
'webino_canonical_redirect' => array(
'enabled' => true,
'www' => false, // bool = enabled|Use URI with www
'slash' => false, // bool = enabled|Use URI with trailing slash
),
Development
We will appreciate any contributions on development of this module.
Learn How to develop Webino modules
Addendum
Please, if you are interested in this Zend Framework module report any issues and don't hesitate to contribute.