Yii2: how to redirect old URLs with 301? – SEO
I have some URLs from the old version of my site that I want to redirect to their new ones in Yii2 due to SEO purposes, eg. /about-us.php to /about. How do I do that? I can't use .htaccess, and…
I have some URLs from the old version of my site that I want to redirect to their new ones in Yii2 due to SEO purposes, eg. /about-us.php to /about. How do I do that? I can't use .htaccess, and…
I am using Yii2 and using the yiirbacDbManager for auth assignment. I was looking at the logs to see where all the database calls are coming from and this query SELECT `b`.* FROM `auth_assignment` `a`, `auth_item` `b` WHERE ((`a`.`item_name`=`b`.`name`) AND…
From phpinfo(): phpinfo, memcache is loaded However, when I try to migrate, show this error: Exception 'yiibaseInvalidConfigException' with message 'MemCache requires PHP memcache extension to be loaded.' in /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/caching/MemCache.php:217 Stack trace: #0 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/caching/MemCache.php(113): yiicachingMemCache->getMemcache() #1 /Library/WebServer/Documents/r2d2/vendor/yiisoft/yii2/base/Object.php(107): yiicachingMemCache->init() #2 [internal function]:…
Assuming we have a page with random seo friendly url like /some/page.html How to describe rules for urlManager in config that specifies condition in where if standard rote (e.g. SomeController with actionPage) does not exitsts than performs the specified default…
The YII2 basic app is installed under localhost in 'ims' folder.The links are like http://192.168.0.99/ims/web/ (homepage) http://192.168.0.99/ims/web/index.php?r=site%2Fabout (about us page) So far what i have done is. 1) in web/.htaccess file Options +FollowSymLinks IndexIgnore */* RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f…
I have a bootstrap select with readonly="true" but I can still change the selected option. I need the disabled="true" behavior, but when I use this the select is not submitted. I need a combination of the 2, the selected option…
Vertical scrollbar is being hidden, when Twitter Bootstrap 3 modal appears, and returns, when modal is hidden. Since certain elements on my page varies its position on whether vertical scrollbar is or isn't visible -- this produces an overall not…
I've created modal window using Yii2 bootstrap Modal. The default behaviour of Modal is if you click outside the modal area, the modal will automatically close. I want to prevent that behaviour means it should not close the modal window…
For SEO purposes I need to remove the first page number from the URL. i.e I have the following: example.com/pages/view/1 and example.com/pages/view the two URLs points to the same contents of the view action. I want to make the pagination…
I would like to have (use) in my Yii2 application: a standard, SEO-like URLs, with .html at the end (thus 'suffix' => '.html') and API request (basing on very simple code) without this suffix. So, to make my application being…