関連記事
さくらインターネットでZendFrameworkを導入する(初期設定編)
http://blogs.yahoo.co.jp/dk521123/24109404.htmlさくらインターネットでZendFrameworkを導入する(.htaccessの設定編)
http://blogs.yahoo.co.jp/dk521123/24128375.html参考資料
http://itblog.posifeel.com/2009/09/21/%E3%81%95%E3%81%8F%E3%82%89%E3%82%A4%E3%83%B3%E3%82%BF%E3%83%BC%E3%83%8D%E3%83%83%E3%83%88%E3%80%80zend-framework%E3%81%AE%E5%B0%8E%E5%85%A5-htaccess%E3%81%AE%E8%A8%AD%E5%AE%9A%E3%81%A7%E3%81%A4/手順
[1] .htaccessの作成
.htaccess
RewriteEngine on RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ ./index.php [L,QSA]
[2] webファイルの作成
index.php
<?php require_once 'Zend/Date.php'; $date = new Zend_Date(); echo $date->get(Zend_Date::RFC_2822);
sample.html
<html> <body> <p>sample.htmlのページです</p> </body> </html>
[3] ファイルをサーバに転送
* 手順[1]のファイルを同一フォルダ内に格納し、FTPソフトを使ってフォルダごと転送する
[4] 動作確認
ブラウザで以下を確認[4-1] http://【ドメイン】.sakura.ne.jp/<任意のフォルダ>/
index.phpが表示されることを確認[4-2] http://【ドメイン】.sakura.ne.jp/<任意のフォルダ>/aaa.html (存在しないURL)
index.phpが表示されることを確認[4-3] http://【ドメイン】.sakura.ne.jp/<任意のフォルダ>/sample.html
sample.htmlが表示されることを確認