Webアプリケーション情報のスクラップ集
お知らせ
2008-10-20
新着記事
PHP関連
symfony1.2でaskeet(サンプルのQ&Aサイト)を再構築する
DB関連
アプリケーションサンプル
CodeIgniterで作成した簡易プロジェクト管理システム
Links
CakePHPでmod_rewriteが使えない場合
CakePHPでmod_rewriteが使えない場合の変更点などのまとめ
手順1.core.phpの修正
/cake /app /config /core.php
の以下のコメントを外す。
/cake /app /config /core.php
/**
* If you do not have mod rewrite on your system
* or if you prefer to use CakePHP pretty urls.
* uncomment the line below.
* Note: If you do have mod rewrite but prefer the
* CakePHP pretty urls, you also have to remove the
* .htaccess files
* release/.htaccess
* release/app/.htaccess
* release/app/webroot/.htaccess
*/
// define ('BASE_URL', env('SCRIPT_NAME')); ← ここのコメントを外す
手順2.htaccessファイルの削除
下記の3つの.htaccessファイルを削除
/cake /.htaccess
/cake /app /.htaccess
/cake /app /webroot /.htaccess
手順3.URLの変更
CakePHPで用いるURLが以下のように変更。
http://設置URL /index.php/コントローラ名 /アクション名/
投稿日:2008/06/10
前後の記事
- SimpleTestでヘッダに情報を追加する方法
- symfony1.1へアップグレードは簡単?
- CakePHPで携帯版のシステムを構築する
- CakePHPでmod_rewriteが使えない場合
- PHP5限定 CakePHPのView内の関数処理を綺麗に記述する(邪道でしょうか?)
