Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/251.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

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.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
Php 使用https时,https可以';找不到codeigniter控制器。跑步中心_Php_Codeigniter_Ssl_Https_Centos - Fatal编程技术网

Php 使用https时,https可以';找不到codeigniter控制器。跑步中心

Php 使用https时,https可以';找不到codeigniter控制器。跑步中心,php,codeigniter,ssl,https,centos,Php,Codeigniter,Ssl,Https,Centos,所以我在我的网站上设置了https。主页可以正常工作。但是,当您尝试转到https://mysite.com/join这样的子文件夹时,会收到以下错误 找不到 在此服务器上找不到请求的URL/join/index.php mysite.com端口443上的Apache/2.2.8(CentOS)服务器 就好像它无法理解codeigniter。下面是我的htaccess文件 RedirectMatch 404 /\\.git(/.*|$) RewriteEngine On Options +Fo

所以我在我的网站上设置了https。主页可以正常工作。但是,当您尝试转到https://mysite.com/join这样的子文件夹时,会收到以下错误

找不到

在此服务器上找不到请求的URL/join/index.php

mysite.com端口443上的Apache/2.2.8(CentOS)服务器

就好像它无法理解codeigniter。下面是我的htaccess文件

RedirectMatch 404 /\\.git(/.*|$)

RewriteEngine On
Options +FollowSymLinks
RewriteBase /
RewriteCond $1 !^(index\.php|images|img|js|css)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L] 
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https: //%{SERVER_NAME}%{REQUEST_URI} [R=301] 
ErrorDocument 404 /system/error/404page.html
我与其他几个开发人员仔细检查了ssl虚拟主机,并且设置正确。奇怪的是,主页可以正常工作,其他什么都没有。我猜这是因为主页上有codeigniter index.php要查看

我将基本URL设置为

codeIgniter中是否缺少一些设置?

更改此行:

RewriteRule ^(.*)$ index.php?/$1 [L] 
致:

否则,.htaccess将被重定向到join文件夹中的index.php,当然它不在那里。

我最终找到了它

在httpd.conf中,我必须更改以下内容:

<Directory />
Options FollowSymLinks
AllowOverride None

</Directory>

选项如下符号链接
不允许超限
为此:

<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>

选项如下符号链接
允许超越所有

我知道这件事很小很烦人。谢谢你们的帮助

我做了更改并重新启动了服务器,但它仍然给我相同的错误。下面是我的htaccess RedirectMatch 404/\\.git(/.*.$)重写引擎在选项+FollowSymLinks RewriteBase/RewriteCond$1^(index\.php | images | img | js | css)RewriteCond%{REQUEST_FILENAME}-f RewriteCond%{REQUEST_FILENAME}-重写规则^(.*)$/index.php?/$1[L]RewriteCond%{HTTPS}off RewriteRule^(.*)$HTTPS://%{SERVER_NAME}%{REQUEST_URI}[R=301]ErrorDocument 404/system/error/404page.htmlIf我添加index.php/join,然后子域工作。所以我很确定我只是做错了htaccess。
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>