Php 在子文件夹中安装Codeigniter,忽略URL中的子文件夹部分

Php 在子文件夹中安装Codeigniter,忽略URL中的子文件夹部分,php,.htaccess,codeigniter,bonfire,Php,.htaccess,Codeigniter,Bonfire,我希望在两个文件夹中安装我的Codeigniter Bonfire应用程序,一个是“en”,另一个是“sl”(两者都有不同的语言和不同的数据库) 到目前为止,我的第一个或主控制器或其调用方式位于公共目录中:root/sl/public/index.php,并声明: $path = ".."; $bonfire_path = "${path}/bonfire"; 我的.htaccess看起来是这样的: RewriteEngine on RewriteBase / ReWriteCond %{R

我希望在两个文件夹中安装我的Codeigniter Bonfire应用程序,一个是“en”,另一个是“sl”(两者都有不同的语言和不同的数据库)

到目前为止,我的第一个或主控制器或其调用方式位于公共目录中:
root/sl/public/index.php
,并声明:

$path = "..";
$bonfire_path = "${path}/bonfire";
我的.htaccess看起来是这样的:

RewriteEngine on
RewriteBase /

ReWriteCond %{REQUEST_URI} !public/
ReWriteRule ^(.*)$ public/$1 [L]

RewriteCond %{REQUEST_FILENAME} !-f 
RewriteCond %{REQUEST_FILENAME} !-d 
RewriteRule .* sl/index.php?/$0 [PT,L] 
如果公用目录存在于根文件夹中,则一切正常,但当我希望将其移动到“sl”文件夹并在URL字段中键入“localhost/sl”时,我得到:

The requested URL /public/ was not found on this server.
所以我试着修复一下我的.htaccess,添加了
ReWriteRule^(.*)$sl/public/$1[L]
(注意“sl/”部分),现在我得到了:

404 Page Not Found

The page you requested was not found.
我希望一切正常如果我在URL字段中键入页面名称,我还希望以应用程序将忽略URL中的/sl/part的方式写入.htaccess