2

I know this has been asked many times before, but the previous solutions/answers aren't working.

I have viewed these:

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
Community
  • 1
  • 1
Phil
  • 10,948
  • 17
  • 69
  • 101
  • 1
    1. You say you're "90% sure". Can you use `apache_get_modules()` or something to be 100% sure? 2. Your RewriteRule is missing public_html, is that intentional? – glomad Jan 24 '13 at 16:47
  • 1. I ran that function and it is indeed installed. 2. I tried with public_html and without, no difference. – Phil Jan 24 '13 at 16:49
  • Can you post the exact error message you get when you remove index.php from the URL? (It could be in either the apache error log OR the CI application log.) – glomad Jan 24 '13 at 16:58
  • I don't have access to the apache log and the CI `application/log` only has an empty `index.html` file. – Phil Jan 24 '13 at 17:09
  • It's probably to do with your host's apache setup, but it's going to be really difficult to debug without seeing the errors. – glomad Jan 24 '13 at 17:24

1 Answers1

0

Set the variable empty as below.

$config['index_page'] = '';

try to replace following variable with these parameters ('AUTO', 'PATH_INFO', 'QUERY_STRING', 'REQUEST_URI', and 'ORIG_PATH_INFO') one by one

$config['uri_protocol'] = 'AUTO';

Ahmed Gaber
  • 707
  • 1
  • 10
  • 27