【发布时间】:2011-02-26 21:00:18
【问题描述】:
我正在努力编写一个 .htaccess 文件来基本上映射以下域:
dev.domain.com/$1 => index.php/dev/$1api.domain.com/$1 => index.php/api/$1domain.com/$1 => index.php/front/$1www.domain.com/$1 => index.php/front/$1
目前,所有内容都映射到index.php/$1,配置如下:
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
这是我默认使用的 php 框架附带的。任何帮助将不胜感激:-) 谢谢!
【问题讨论】:
标签: php .htaccess mod-rewrite apache2