Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/6.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
.htaccess和Kohana';子目录中的s2.x项目_.htaccess_Joomla_Kohana_Subdirectory - Fatal编程技术网

.htaccess和Kohana';子目录中的s2.x项目

.htaccess和Kohana';子目录中的s2.x项目,.htaccess,joomla,kohana,subdirectory,.htaccess,Joomla,Kohana,Subdirectory,我在我的基本目录中有一个关于Joomla1.5的网站,还有一个用Kohana2.x编写的项目 问题是子目录中的.htaccess无法正常工作 问题:如何配置以及配置哪个.htaccess?在子目录中,my.htaccess文件如下所示: RewriteEngine On RewriteBase /app/ RewriteRule ^(application|system) - [F,L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQU

我在我的基本目录中有一个关于Joomla1.5的网站,还有一个用Kohana2.x编写的项目

问题是子目录中的.htaccess无法正常工作

问题:如何配置以及配置哪个.htaccess?在子目录中,my.htaccess文件如下所示:

RewriteEngine On
RewriteBase /app/
RewriteRule ^(application|system) - [F,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]

当我键入“app”时,subdir中的项目始终尝试转到名为“app”的控制器http://example.com/app“

我添加了以下内容:

RewriteRule ^(.*)$ index.php/$1 [PT,L]
RewriteRule ^$ index.php/$1 [PT,L]
而且它工作得很好

问题出在托管服务器上。未正确处理PT,需要添加上述线路

一切正常:

但是,以下措施不起作用:

似乎在没有传递其他内容的情况下没有添加index.php。因此,行:

RewriteRule ^$ index.php/$1 [PT,L]

我补充了以下内容:

RewriteRule ^(.*)$ index.php/$1 [PT,L]
RewriteRule ^$ index.php/$1 [PT,L]
而且它工作得很好

问题出在托管服务器上。未正确处理PT,需要添加上述线路

一切正常:

但是,以下措施不起作用:

似乎在没有传递其他内容的情况下没有添加index.php。因此,行:

RewriteRule ^$ index.php/$1 [PT,L]