CodeIgniter htaccess子文件夹问题

时间:2011-09-23 10:17:38

标签: apache .htaccess codeigniter subdirectory

我想在文件夹test

中的第二个网站

www.mydomian.com/test

在linux上运行的Apache服务器。

但是当我在导航器样式中加载它时,无法找到图像,助手。

我的htaccess是这样的:

    RewriteEngine On

RewriteBase / test

RewriteCond %{REQUEST_URI} ^system.*
RewriteCond $1 !^(index\.php|images|robots\.txt)


RewriteCond %{REQUEST_URI} ^application.*
RewriteRule ^(.*)$ /test/index.php?/$1 [L]


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

提前谢谢

我已经尝试了你所说的,把你给我的htaccess文件放在test文件夹中,另一个放在根目录中,它不起作用。

其他选择?

1 个答案:

答案 0 :(得分:4)

尝试将.htaccess文件添加到测试文件夹中。

我使用此.htaccess内容:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

test 文件夹中,我会放置另一个.htaccess,内容几乎相同:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /test/index.php?/$1 [L]