Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/url/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
codeigniter中多个应用程序的htaccess文件问题_Codeigniter_Url - Fatal编程技术网

codeigniter中多个应用程序的htaccess文件问题

codeigniter中多个应用程序的htaccess文件问题,codeigniter,url,Codeigniter,Url,我在一个codeigniter中运行3个应用程序。当我运行第一个应用程序时,我键入//localhost/foldername,它运行得很好;当我运行第二个应用程序时,它使用localhost/foldername/admin.php;当我运行第三个应用程序时,它使用localhost/foldername/project.php,我想删除.php 我试过这个 RewriteEngine On RewriteCond %{REQUEST_URI} ^/system.* RewriteRu

我在一个codeigniter中运行3个应用程序。当我运行第一个应用程序时,我键入//localhost/foldername,它运行得很好;当我运行第二个应用程序时,它使用localhost/foldername/admin.php;当我运行第三个应用程序时,它使用localhost/foldername/project.php,我想删除.php 我试过这个

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



 My Application Structure is like :
    -abc
    --application-htaccess
    --application2-htaccess
    --application3-htaccess
    --assets
    --systems
    --uploads
    --htaccess
    --index.php
    --application2.php
    --application3.php

URL:localhost/abc/application1/-----------错误----禁止目录访问

在所有应用程序中添加此
.htaccess
。这是我的工作

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

重新启动发动机
重写cond%{REQUEST_FILENAME}-F
重写cond%{REQUEST_FILENAME}-D
重写规则^(.*)$index.php?/$1[L]

我在所有应用程序中添加了代码,上面写着“禁止目录访问”。您在应用程序根文件夹中添加了此
.htaccess
?我也在所有应用程序中的所有htaccess文件中添加了此代码