私は多くの記事を見て、さまざまな方法を試しましたが、それでもうまくいきません。
これで、私の URL は のようになりますmysite.com/index.php/[controller]
。目標はmysite.com/[controller]
。
config.phpで:
$config['index_page'] = "";
$config['uri_protocol'] = 'REQUEST_URI';
私の.htaccessファイルには
RewriteEngine on
RewriteCond $1 !^(index\.php|resources|robots\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]
また、Apache サーバーでmod_rewriteが有効になっています。
他の解決策はありますか?