移动版本的网站使用CodeIgniter
问题描述:
我想要做的是在CodeIgniter中创建我的网站的移动版本。
What I want to do is to create a mobile version of my web site in CodeIgniter.
我想将我的完整网站重定向到m.example.com
I want to redirect my complete web site to m.example.com
控制器不会有任何变化,无论是视图还是模型。两者将是相同的。
There will be no change in controllers, neither in views and models. Both will be the same.
我不想更改我的.htaccess文件。任何可能的解决方案?
I don't want to change my .htaccess file. Any possible solutions for this?
答
Ok我找到了另一个解决方案。我使用钩子预控制器和我重新定向www子域到m子域。
Ok I found another solution. I used hooks pre controller and I redirect www subdomain to m subdomain.