Skip to content

Commit 8d8e34e

Browse files
dev
1 parent b4fcdf2 commit 8d8e34e

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

controllers/RedirectController.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,12 @@ public function actionRedirect()
2727
$url = base64_decode($url);
2828
}
2929

30-
return $this->redirect($url);
30+
\Yii::info("redirrect to: " . $url, self::class);
31+
32+
return $this->render($this->action->id, [
33+
'url' => $url
34+
]);
35+
//return $this->redirect($url);
3136
}
3237

3338
throw new BadRequestHttpException;

views/redirect/redirect.php

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
<?php
2+
/**
3+
* @link https://cms.skeeks.com/
4+
* @copyright Copyright (c) 2010 SkeekS
5+
* @license https://cms.skeeks.com/license/
6+
* @author Semenov Alexander <semenov@skeeks.com>
7+
*/
8+
/**
9+
* @var $this yii\web\View
10+
*/
11+
12+
\Yii::$app->externalLinks->enabled = false;
13+
?>
14+
15+
<div style="text-align: center; padding: 100px 50px;">
16+
<h1>Вы сейчас будете перенаправлены на страницу</h1>
17+
<h2><a href="<?php echo $url; ?>"><?php echo $url; ?></a></h2>
18+
</div>
19+
<?php
20+
$this->registerJs(<<<JS
21+
setTimeout(function() {
22+
window.location.href = "{$url}";
23+
}, 2000);
24+
JS
25+
);
26+
?>

0 commit comments

Comments
 (0)