main-local.php 475 B

1234567891011121314151617
  1. <?php
  2. $config = [
  3. 'components' => [
  4. 'request' => [
  5. // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation
  6. 'cookieValidationKey' => '',
  7. ],
  8. ],
  9. ];
  10. if(isset($_SERVER['REQUEST_URI'])){
  11. preg_match('/\?r=(.*?)[%2F|\/]|(.*?)&r=(.*?)[%2F|\/]/',$_SERVER['REQUEST_URI'],$match);
  12. $config['components']['urlManager']['enablePrettyUrl'] = !$match ? true : false;
  13. }
  14. return $config;