0

私はに変更$config['index_page']しました

$config['index_page'] = ''

また、.htaccess ファイルの内容を次のように更新しました。

RewriteEngine on
RewriteCond $1 !^(index\.php|public|\.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?$1

しかし、URLにindex.phpを入れないとコントローラーにアクセスできません。それで、次に何をすべきですか?

4

2 に答える 2

0

次の.htaccessで試してみてください。私にとってはうまくいきます。

# index file can be index.php, home.php, default.php etc.
DirectoryIndex index.php

# Rewrite engine
RewriteEngine On

# condition with escaping special chars
RewriteCond $1 !^(index\.php|robots\.txt|favicon\.ico)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ ./index.php/$1 [L,QSA]
于 2013-08-01T10:41:24.360 に答える