123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- <?php
- use think\facade\Route;
- use think\facade\Request;
- Route::domain('install.php', ':\app\install\controller');
- Route::rule('/', function () {
- if (Request::isMobile()) {
- return redirect('/wap');
- } else {
- return redirect('/web');
- }
- });
- Route::rule('admin', function () {
- return view(app()->getRootPath() . 'public/admin/index.html');
- })->pattern(['any' => '\w+']);
- Route::rule('site', function () {
- return view(app()->getRootPath() . 'public/admin/index.html');
- })->pattern(['any' => '\w+']);
- Route::rule('home', function () {
- return view(app()->getRootPath() . 'public/admin/index.html');
- })->pattern(['any' => '\w+']);
- Route::rule('decorate/:any', function () {
- return view(app()->getRootPath() . 'public/admin/index.html');
- })->pattern(['any' => '\w+']);
- Route::rule('wap', function () {
- return view(app()->getRootPath() . 'public/wap/index.html');
- })->pattern(['any' => '\w+']);
- Route::rule('web', function () {
- return view(app()->getRootPath() . 'public/web/index.html');
- })->pattern(['any' => '\w+']);
- Route::any('MP_verify_<name>.txt', function ($name) {
- header('Content-Type:text/plain; charset=utf-8');
- echo $name;exit();
- });
|