Supports alias URL's. AKA seo URL's
Great way to manage rewrite paths for your website!, (*1)
The preferred way to install this extension is through composer., (*2)
Either run, (*3)
php composer.phar require --prefer-source "c006/yii2-alias-url" ">=2.1"
or add, (*4)
"c006/yii2-alias-url": ">=2.1"
to the require section of your composer.json
file., (*5)
Next check that a database connection is setup, (*6)
Run this to setup the tables., (*7)
$ yii migrate --migrationPath=@vendor/c006/yii2-alias-url/migrations
or -- if using yii2-console, easy to use migration alternative, (*8)
$ yii migrate2 m000000_000000_c006_url
, (*9)
Basic "config/web.php", (*10)
Advanced "config/main.php", (*11)
> 'components' => [ ... ... ... 'urlManager' => [ 'enablePrettyUrl' => FALSE, 'showScriptName' => FALSE, ], ],, (*12)
> 'modules' => [ ... ... ... 'alias' => [ 'class' => 'c006\url\Module', 'is_frontend' => {TRUE/FALSE} ], ],, (*13)
Do not use .htaccess
, (*14)
**Use Mod_Rewrite in your host / virtual host file
>
This goes for frontend and backend if using advanced., (*16)
Go to:, (*17)
/alias
, (*18)
click > create url
, (*19)
> public => abc private => site/about, (*20)
Now /abc
will display site/about
, (*21)
Note private can have a dynamic query string. > public => abc private => site/about?id=123, (*22)
Use the issue ticket to provide any helpful feedback, requests or questions., (*23)
Thanks., (*24)