From b9429864199ea1d6977298e683ab752d33b597c2 Mon Sep 17 00:00:00 2001 From: fengyuexingzi Date: Mon, 30 Oct 2017 17:40:26 +0800 Subject: [PATCH] route --- public/.htaccess | 6 +++++- public/mobile.php | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 public/mobile.php diff --git a/public/.htaccess b/public/.htaccess index cbc7868..bb81406 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -4,5 +4,9 @@ RewriteCond %{REQUEST_FILENAME} !-d RewriteCond %{REQUEST_FILENAME} !-f - RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L] + RewriteRule ^(.*)$ index.php?/$1 [QSA,PT] + + RewriteCond %{HTTP_USER_AGENT} Mobile* [NC] + RewriteRule index.php mobile.php/$1 [QSA,PT,L] + diff --git a/public/mobile.php b/public/mobile.php new file mode 100644 index 0000000..43594b3 --- /dev/null +++ b/public/mobile.php @@ -0,0 +1,9 @@ +