0

I have the following .htaccess file, which worked fine on my old host. I moved over to an AWS instance (Ubuntu 12.04 LTS), and it's no longer completely working:

<IfModule mod_rewrite.c>
    RewriteEngine On

    RewriteCond %{HTTPS} !=on
    RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [R,L]

    RewriteCond %{REQUEST_URI} ^system.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_URI} ^application.*
    RewriteRule ^(.*)$ /index.php?/$1 [L]

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L]
</IfModule>

<IfModule !mod_rewrite.c>
    ErrorDocument 404 /index.php
</IfModule> 

I know rewrite is installed, because this is partly working - it does send HTTP requests to HTTPS. Also, it does show up in the list of running modules. However, I can't use URLs without index.php anymore, as it all comes up as 404. Since this is an exact copy of a site that was already working, I figure I must have done something wrong when installing apache, but I can't imagine what.

1 Answer 1

0

In spite of cool kids voting the question down without explanation, I managed to figure it out. The problem was that since it's HTTPS, changing AllowOverride to All in /etc/apache2/sites-enabled/default wasn't working. You need to edit default-ssl in that case.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .