Skip to content

Instantly share code, notes, and snippets.

@cetver
Created September 26, 2013 14:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cetver/6714949 to your computer and use it in GitHub Desktop.
Save cetver/6714949 to your computer and use it in GitHub Desktop.
Yii https url rules
<?php
foreach ($httpsRules as $pattern => $route) {
if (is_string($route) === true || (is_array($route) && isset($route['class']) === false)) {
if (parse_url($pattern, PHP_URL_SCHEME) === 'http') {
$httpsRules = array_merge($httpsRules, array(str_replace('http', 'https', $pattern) => $route));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment