Posts

Showing posts from July, 2018

Comfigure VLAN for TM Unifi

Router: WAN Port (Internet): Enable VLAN: Yes VLAN ID: 500 Tagged: Tagged IP TV Port: Enable VLAN: Yes VLAN ID: 600 Tagged: Untagged Other Ports (LAN): Enable VLAN: No VLAN ID: <Blank&gt> Tagged: Exclude Network Switch: VLAN 1 ID: 1 Name: Default Ports: Select all ports Tagged Ports: None Untagged Ports: Select all ports VLAN 2 ID: 500 Name: Internet Ports: 1 and 2 (or select any other 2 ports) Tagged Ports: 1 (This will connect to BTU) Untagged Ports: 2 (This will connect to router or PC) VLAN 3 ID: 600 Name: IPTV Ports: 1 and 3 (select same port as tagged port in VLAN 500 and select one other unused port) Tagged Ports: 1 (This will connect to BTU, same tagged port as in VLAN 500) Untagged Ports: 3 (This will connect to IPTV STB) Note, you cannot use other ports in the switch for your LAN. Credit: https://www.blacktubi.com/guide/make-any-router-work-on-unifi

Enable Search Engine Friendly (Pretty URLs) in Yii2

In config/web.php : 'urlManager' => [ 'class' => 'yii\web\UrlManager', // Hide index.php 'showScriptName' => false, // Use pretty URLs 'enablePrettyUrl' => true, 'rules' => [ ], ], Create .htaccess file in web root folder: RewriteEngine on # If a directory or a file exists, use the request directly RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d # Otherwise forward the request to index.php RewriteRule . index.php To use Gii in Pretty URL, add these in rules: 'urlManager' => [ 'class' => 'yii\web\UrlManager', // Hide index.php 'showScriptName' => false, // Use pretty URLs 'enablePrettyUrl' => true, 'rules' => [ 'gii' => 'gii', 'gii/<controller:\w+>' => 'gii/<controller>', 'gii/<controller:\w+>/...