codeIgniter htaccess的子文件夹的问题

编程入门 行业动态 更新时间:2024-10-27 02:21:47
本文介绍了codeIgniter htaccess的子文件夹的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

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

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

www.mydomian/test

www.mydomian/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]

更多推荐

codeIgniter htaccess的子文件夹的问题

本文发布于:2023-11-01 11:21:54,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1549204.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:文件夹   codeIgniter   htaccess

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!