skeeks / yii2-external-links
AutoCorrect external links after rendering html page
Installs: 2 904
Dependents: 1
Suggesters: 0
Security: 0
Stars: 4
Watchers: 3
Forks: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.13
README
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist skeeks/yii2-external-links "*"
or add
"skeeks/yii2-external-links": "*"
How to use (simple)
//App config [ 'bootstrap' => ['externalLinks'], 'components' => [ //.... 'externalLinks' => [ 'class' => 'skeeks\yii2\externalLinks\ExternalLinksComponent', ], //.... ], 'modules' => [ //.... 'externallinks' => [ 'class' => 'skeeks\yii2\externalLinks\ExternalLinksModule', ], //.... ] ]
How to use (advanced)
//App config [ 'bootstrap' => ['externalLinks'], 'components' => [ //.... 'externalLinks' => [ 'class' => 'skeeks\yii2\externalLinks\ExternalLinksComponent', //Additional 'enabled' => true, 'noReplaceLocalDomain' => true, 'backendRoute' => '/externallinks/redirect/redirect', 'backendRouteParam' => 'url', 'enabledB64Encode' => true, 'noReplaceLinksOnDomains' => [ 'site1.ru', 'www.site1.ru', 'site2.ru', ], ], 'urlManager' => [ 'rules' => [ //Rewriting the standard route //And add robots.txt Disallow: /~* '~skeeks-redirect' => '/externallinks/redirect/redirect', ] ] //.... ], 'modules' => [ //.... 'externallinks' => [ 'class' => 'skeeks\yii2\externalLinks\ExternalLinksModule', ], //.... ] ]
SkeekS CMS (Yii2) — quickly, easily and effectively!
skeeks.com | cms.skeeks.com