codeigniter子文件夹中多个控制器

编程入门 行业动态 更新时间:2024-10-26 22:16:19
本文介绍了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子文件夹中多个控制器

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

发布评论

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

>www.elefans.com

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