codeIgniter htaccess的子文件夹的问题文件夹、问题、codeIgniter、htaccess

2023-09-02 00:33:06 作者:要么没有,要么全部,要么现在,要么永不。从现在起,我将不再期

我想第二个网站在我的文件夹里面的测试域

I want a second website in my domain inside the folder test

www.mydomian.com/test

www.mydomian.com/test

Apache服务器运行在Linux上。

Apache server running on linux.

但是,当我在我的导航样式,图像加载它,助手都找不到。

But when I load it in my navigator styles, images, helpers can't be found.

我的htaccess是这样的:

My htaccess is like this:

    RewriteEngine叙述在

RewriteEngine On

的RewriteBase /测试

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文件,它没有工作。

I have tried what you said, placing the htaccess file you gave me in the test folder and the other one in the root directory, it didn't work.

其他选择?

推荐答案

尝试添加.htaccess文件到test文件夹,而不是。

Try adding a .htaccess file into your test folder instead.

我用这个的.htaccess内容:

I use this .htaccess content:

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

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

In the folder test I would place another .htaccess, with almost the same content:

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