所以我设置了https在我的网站上工作。主页工作。 https://mysite.com但是当您尝试转到像https://mysite.com/join这样的子文件夹时,会收到以下错误消息。使用https时,https无法找到codeigniter控制器。运行Centos
未找到
请求的URL /join/index.php此服务器上找到。
的Apache/2.2.8(CentOS的)在mysite.com服务器端口443
这是因为如果它无法理解笨。以下是我的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 virtualhosts与其他几个开发者,它是树立正确的。主页的工作原理很奇怪,没有别的。我猜这是因为主页有codeigniter index.php来看看。
我将基础URL设置为https://mysite.com。
我缺少codeIgniter中的一些设置吗?
**我做了更改,我重新启动服务器,但它仍然给我同样的错误。下面是我的htaccess ** RedirectMatch 404 /\\.git(/.*|$) RewriteEngine叙述在 选项+的FollowSymLinks RewriteBase/ 的RewriteCond $ 1→(索引\ .PHP!|图片|张图片| JS | CSS) 的RewriteCond%{REQUEST_FILENAME}!-f 的RewriteCond%{REQUEST_FILENAME}!-d 重写规则^(。*)$ /index.php?/$1 [L] 的RewriteCond%{HTTPS}关闭 重写规则^(。 *)$ https://%{SERVER_NAME}%{REQUEST_URI} [R = 301] ErrorDocument 404 /system/error/404page.html – H0miet
如果我添加index.php/join,那么子域的工作原理。所以我很确定我只是在做一些错误的htaccess。 – H0miet