diff --git a/.htaccess b/.htaccess index 29c3bec..984d5d3 100644 --- a/.htaccess +++ b/.htaccess @@ -1,18 +1,18 @@ -Mod_Autoindex - - # Запрещаем просмотр содержимого папок - Options -Indexes - - -Mod_Rewrite - - Options +FollowSymlinks - # Включаем mod_rewrite - RewriteEngine On - IndexIgnore */* - # Перенаправляем administrator на входной скрипт админки - RewriteRule ^administrator/(.*)?$ /backend/web/$1 [L,PT] - RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT] - # Перенаправляем все запросы на входной скрипт - RewriteRule ^([^/].*)?$ /frontend/web/$1 - \ No newline at end of file +#Mod_Autoindex +# +# # Запрещаем просмотр содержимого папок +# Options -Indexes +# +# +#Mod_Rewrite +# +# Options +FollowSymlinks +# # Включаем mod_rewrite +# RewriteEngine On +# IndexIgnore */* +# # Перенаправляем administrator на входной скрипт админки +# RewriteRule ^administrator/(.*)?$ /backend/web/$1 [L,PT] +# RewriteRule ^storage/(.*)?$ /storage/$1 [L,PT] +# # Перенаправляем все запросы на входной скрипт +# RewriteRule ^([^/].*)?$ /frontend/web/$1 +# \ No newline at end of file diff --git a/common/config/main.php b/common/config/main.php index c9071d1..3db6873 100644 --- a/common/config/main.php +++ b/common/config/main.php @@ -1,9 +1,15 @@ dirname(dirname(__DIR__)) . '/vendor', 'components' => [ 'cache' => [ 'class' => 'yii\caching\FileCache', ], + 'urlManager' => [ + 'enablePrettyUrl' => true, + 'showScriptName' => false, + 'rules' => $rules, + ], ], ]; diff --git a/common/config/rules.php b/common/config/rules.php new file mode 100644 index 0000000..c7650f5 --- /dev/null +++ b/common/config/rules.php @@ -0,0 +1,7 @@ +' => '/index', + '/' => '/', + '//' => '/', + ]; \ No newline at end of file diff --git a/console/migrations/m150818_125718_create_user_180815.php b/console/migrations/m150818_125718_create_user_180815.php new file mode 100644 index 0000000..db70571 --- /dev/null +++ b/console/migrations/m150818_125718_create_user_180815.php @@ -0,0 +1,44 @@ + 'admin', + 'auth_key' => 'admin', + 'password_hash' => Yii::$app->security->generatePasswordHash('admin'), + 'password_reset_token' => 'admin', + 'email'=> 'admin@test.com', + 'status' => '10', + 'created_at'=>'000000', + 'updated_at' => '000000' + ]; + $this->insert('{{%user}}', $user_array); + } + + + + public function down() + { + $this->dropTable('{{%user}}'); + } + + /* + // Use safeUp/safeDown to run migration code within a transaction + public function safeUp() + { + } + + public function safeDown() + { + } + */ +} -- libgit2 0.21.4