I'm trying to remove "index.php" in the CodeIgniter URLs.
I have it working on my Mac (MAMP), but can’t get it working on my Ubuntu (Lucid) hosted server.
This works: mysite.com/index.php/home
But this generates 404 errors: mysite.com/home
I’ve followed the instructions from this post and included the following lines in my .htaccess file.
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
- I’ve confirmed that mod-rewrite is loaded on Apache2.
- The .htaccess file is in the webroot (/var/www), which is also where my main index.php is.
- The .htaccess file permissions are: -rwxrwxr-x
- I've tried about 20 different posted answers for the .htaccess file, so I suspect there's something wrong with my overall Apache config on my hosted Ubuntu (Lucid) server.
What other Apache configs need to be set to make mod-rewrites work? My httpd.conf file is empty.
Thanks!