Codeigniter通配符子域

时间:2014-06-10 08:29:08

标签: .htaccess codeigniter subdomain

如何使用codeigniter创建通配符子域?我在谷歌和这个网站上尝试过任何东西。但它不会工作,如果不是500错误页面它将不返回任何内容(我的意思是没有效果),因为我之前在我的.htaccess上得到了这个:

<IfModule mod_rewrite.c>
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule .* index.php/$0 [PT,L]  
</IfModule>

我认为它总是与上面那个相冲突,顺便说一下我想要的是:

example.com/page => example.com/page (without subdomain will just be normal, with no www and no index.php)
abc.example.com => example.com/abc-channel
exc.example.com => example.com/exc-channel
abc.example.com/my/foo/page => example.com/abc-channel/my/foo/page

所有内容都将在没有重定向的情况下生成。

0 个答案:

没有答案
相关问题