Welcome Guest, Not a member yet? Register   Sign In
Yet (another) htacess problem
#1

[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?


Messages In This Thread
Yet (another) htacess problem - by El Forum - 02-21-2012, 09:12 AM
Yet (another) htacess problem - by El Forum - 02-21-2012, 09:18 AM
Yet (another) htacess problem - by El Forum - 02-21-2012, 10:47 AM
Yet (another) htacess problem - by El Forum - 02-21-2012, 11:19 AM
Yet (another) htacess problem - by El Forum - 02-21-2012, 12:05 PM



Theme © iAndrew 2016 - Forum software by © MyBB