I know this has been asked many times before, but the previous solutions/answers aren't working.
I have viewed these:
- Remove index.php From URL - Codeigniter 2
- mod_rewrite to remove index.php from Codeigniter in subdirectory
- Using htaccess to remove codeigniter index.php in a subdirectory
I have used these solutions successfully in the past, but this install is giving me problems. I am thinking this might be more than an .htaccess
issue.
Description
My folder setup is as follows: /home/~username~/public_html/~company~/index.php
. My $config['index_page']
is set to ""
and my server has mod_rewrite enabled. I am using CI version, 2.1.3
The .htaccess
file is located in the same folder as the application
folder.
Problem
I can't seem to remove the index.php
from my URL without the application breaking. I have tried many, many .htaccess
setups, including the one provided on the CI website.
I am at a loss. If it's not my .htaccess
file, what could it be? If it is my .htaccess
file, what am I doing wrong? My latest attempts are these:
RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php) [NC]
RewriteRule ^(.*)$ /home/username/company/index.php/$1 [L] //absolute path
and
""
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ company/index.php/$1 [L]
Full apache
error:
[Thu Jan 24 18:22:13 2013] [error] [client ip ]
File does not exist: /home/username/public_html/company/home