Difference between #3 and #4 of
How to ensure unicity to url

Revision #4 has been created by marcovtwout on Dec 12, 2011, 3:39:43 PM with the memo:

yii error handler
« previous (#3)

Changes

Title unchanged

How to ensure unicity to url

Category unchanged

Tips

Yii version unchanged

Tags unchanged

SEO, unique, URL

Content changed

[...]
```php
public function beforeAction($action)
{
$
url = normalizedUrl = CHtml::normalizeUrl(array_merge( array( "/" . .$this->route ), $_GET )); if( (Yii::app()->request->url != CHtml::$normalizedUrl( $url )  && strpos($normalizedUrl, Yii::app()->errorHandler->errorAction) === false) { $this->redirect( $u$normalizedUrl, true, 301 );
}
[...]
public function beforeAction($action)
{
$
url = normalizedUrl = CHtml::normalizeUrl(array_merge( array( "/" . .$this->route ), $_GET )); if( (Yii::app()->request->url != CHtml::$normalizedUrl( $url )  && strpos($normalizedUrl, Yii::app()->errorHandler->errorAction) === false) { $this->redirect( $u$normalizedUrl, true, 301 );
}

return parent::beforeAction($action);
}
}
[...]
13 0
16 followers
Viewed: 23 679 times
Version: 1.1
Category: Tips
Tags: SEO, unique, URL
Written by: zaccaria
Last updated by: marcovtwout
Created on: Jul 26, 2011
Last updated: 12 years ago
Update Article

Revisions

View all history