CodeIgniter 1.7.3 でindex.phpを消すためのmod_rewrite設定 @さくらのレンタルサーバ

CodeIgniter 1.7.3 でindex.phpを消すためのmod_rewrite設定 @さくらのレンタルサーバ

さくらのレンタルサーバで、CodeIgniterを使うために
mod_rewriteの設定を .htaccess で行ったが、うまく動かなかった。
↓参考にしている本


ネットで調べて下記の記事を読むことで解決した。念のためメモしておく。
さくらインターネット(スタンダード)にSeezooCMSを入れる。」
http://agilmente.com/blog/2010/10/26/sakurastd_install_seezoo/

.htaccess
RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|sitemap.xml|sitemap_ssl.xml|css|js|captcha|uploads|templates|blocks|phpMyAdmin|.+\.gif$|.+\.jpg$|.+\.png$|.+\.js$|.+\.css$|.+\.json$|.+\.ico$|.+\.swf$|.+\.flv$)
RewriteRule ^(.*)$ /index.php?__REQ__=$1 [L]
index.php

index.phpの冒頭に下記を追加

if( isset( $_GET['__REQ__'] ) ){
    $_SERVER['PATH_INFO'] = $_GET['__REQ__'];
}
/system/application/config/config.php

uri_protocolをPATH_INFOにする。

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