Commit 8f7c59fae24d9ca1740aac25ec4b510a46d1e269

Authored by alex
1 parent 3d2e4c72

redirect trim

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
frontend/components/UrlManager.php
... ... @@ -72,7 +72,7 @@
72 72 public function parseRequest($request)
73 73 {
74 74 $redirect = $this->checkRedirect($request->url);
75   -
  75 +// die(var_dump($redirect));
76 76 if ($redirect !== null) {
77 77  
78 78 \Yii::$app->response->redirect("/" . $redirect->value, 301);
... ... @@ -211,10 +211,12 @@
211 211 }
212 212  
213 213 $string .= '}';
  214 +
214 215 $alias = Alias::find()
215   - ->where(['route' => $string])
  216 + ->where(['route' => trim($string)])
216 217 ->one();
217   -
  218 +// die(var_dump(Alias::find()
  219 +// ->where(['route' => $string])->createCommand()->rawSql));
218 220 return $alias;
219 221  
220 222  
... ...