开发者

CodeIgniter htaccess subfolder problem

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

www.mydomian.com/test

Apache server running on linux.

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

My htaccess 开发者_StackOverflowis like this:

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]

Thank you in advance

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.

Other options?


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

I use this .htaccess content:

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

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]
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜