[eluser]JonoB[/eluser]
Trying to set up a CI install on a sub-domain.
application/config/config.php:
Code:
$config['base_url'] = 'http://testing.mysite.com';
$config['index_page'] = '';
.htaccess file:
Code:
<IfModule mod_rewrite.c>
DirectoryIndex index.php
RewriteEngine on
RewriteCond $1 !^(index\.php|images|css|js|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
</IfModule>
This works perfectly.
However, I want everything to run on SSL. So the following is changed in config.php:
Code:
$config['base_url'] = 'https://testing.mysite.com';
And I add the following lines to the end of the htaccess file:
Code:
RewriteCond %{HTTPS} off
RewriteCond %{HTTP_HOST} ^(testing)\. [NC]
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]
And then I get a 404 (not a CI 404).
Any ideas?