codeigniter子文件夹中多个控制器 [英] Codeigniter sub-folder multiple controllers
本文介绍了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>
这是我的网站的网址
http://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子文件夹中多个控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文