Reputation: 91
SO I set up https to work on my site. the main page works. https://mysite.com but when you try to go to a sub folder like https: //mysite.com/join you receive the following error.
Not Found
The requested URL /join/index.php was not found on this server.
Apache/2.2.8 (CentOS) Server at mysite.com Port 443
It's as if it can't understand codeigniter. Below is my htaccess files.
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
I doubled check the ssl virtualhosts with several other developers and it is set up right. It's weird that the home page works and nothing else. I'm guess it is because the home page has the codeigniter index.php to look at.
I set up the base URL as https://mysite.com.
Is there some settings in codeIgniter that I am missing?
Upvotes: 0
Views: 2537
Reputation: 91
I figured it finally.
in the httpd.conf I had to change this:
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
To this:
<Directory />
Options FollowSymLinks
AllowOverride All
</Directory>
I knew it was something this small and annoying. Thanks for the help guys!
Upvotes: 1
Reputation: 6145
Change this line :
RewriteRule ^(.*)$ index.php?/$1 [L]
to :
RewriteRule ^(.*)$ /index.php?/$1 [L]
The .htaccess would otherwise be redirected relatively to a index.php in the join folder, which off course is not there.
Upvotes: 0