Apache を最新バージョンにアップグレードすることはできないため、ここでは、この条件付き設定を行う1 つの回避策を示します。
1 - [DOCUMENT_ROOT
このコマンドを実行して、次のシンボリック リンクを作成します]index.php
で__anything.php
ln -s index.php __anything.php
2 - 新しいコードを行のDOCUMENT_ROOT/.htaccess
すぐ下に配置しRewriteEngine On
ます。全体的.htaccess
には次のようになります。
# forward all URLs starting with /admin/ to __anything.php
RewriteRule ^(admin(?:/.*|))$ __anything.php?/$1 [L,NC]
# set max_input_vars to 2000 for file __anything.php
<FilesMatch "^__anything\.php">
php_value max_input_vars 20000
</FilesMatch>
# your regular Codeignitor controller code
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
PS:私は CI をインストールしていないので、実際にこれを CI でテストすることはできませんが、それ以外の場合はこれをテストしてmax_input_vars
価値を高めました。