本文介绍了codeigniter子文件夹中多个控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
下面是我的htaccess的文件,它的工作原理有点。没有关系我指定哪些控制器,它总是转到主页
Here is my htaccess file and it works somewhat. Not matter what controller I specify it always goes to the home page
<IfModule mod_rewrite.c> RewriteEngine On #Checks to see if the user is attempting to access a valid file, #such as an image or css document, if this isn't true it sends the #request to index.php RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d #This last condition enables access to the images and css folders, and the robots.txt file RewriteCond $1 !^(index\.php|css|js) RewriteRule ^(.*)$ index.php/$1 [L] </IfModule>这是我的网站的网址
automationmetrics.local/automation/
思考?
推荐答案前两个规则被触发上的所有文件,就像它说在注释中。所以这一个:
The first two rules get triggered on all the files, just like it says in the comment. So this one:
RewriteCond $1 !^(index\.php|css|js)
似乎是多余的,并删除它应该解决您遇到的问题。
seems redundant and removing it should solve the issue you're having.
更多推荐
codeigniter子文件夹中多个控制器
发布评论