Problem rewriting CodeIgniter URLs

So basically I have the same problem described here and there . I tried everything described (and much more ...), but anyway. Here is my .htaccess:

RewriteEngine on

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

I tried different things, for example, adding "/" before "index.php" or without "?" after "index.php", but nothing has changed.

We have the same file in the development environment, but when I go into production, I just can't make index.php disappear. The only difference between the two environments is their location on the corresponding server (... / public_html / APP vs ... / public _html / sub-domains-name / APP), I do not think this is related, but I already had Some problems with CI when moving the application, so maybe there is something there.

Oh, and finally, here is the related line in the config.php file:

$config['base_url'] = "http://www.domain.com/";
$config['index_page'] ='';
$config['uri_protocol'] = "AUTO";

EDIT In addition, since the development and development environment is on the same server, I have already ruled out the possibility of a configuration problem on behalf of apache.

EDIT2 (www.domain.com/test/). , ... , -.

+3
1

. :

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

$config['uri_protocol'] = "QUERY_STRING";

.

apache, , apache CI . CI :

$config['log_threshold'] = 2;

system/logs, apache .

+1

Source: https://habr.com/ru/post/1731274/


All Articles