■ユーザーズフォーラム リニューアルのお知らせ
新規投稿は新ユーザーズフォーラムにお願いします。

Re: サーバ環境について

grache > Re: サーバ環境について @ 2013/5/23 10:52
goichi 様

いろいろとありがとうございます。

現在、本環境での動作テストのため
/testcms のサブディレクトリでチェックしている最中です。

/に設置の「.htaccess」(「.htaccess」が動いているかの確認のため)

ErrorDocument 404 http://www.aaa.bbb.ccc.jp/


/testcmsに設置の「.htaccess」
php_flag output_buffering Off
php_value output_handler none
php_value default_charset UTF-8
php_value mbstring.language Japanese
php_flag mbstring.encoding_translation Off
php_value mbstring.http_input pass
php_value mbstring.http_output pass
php_value mbstring.internal_encoding UTF-8
php_value mbstring.detect_order none
php_value mbstring.substitute_character none

RewriteEngine on
RewriteBase /testcms
RewriteRule ^$ app/webroot/ [L]
RewriteRule (.*) app/webroot/$1 [L]

#
# /.htaccess
#
# 【スマートURLについて】
# 短くスマートなURLを実現する為には、ApacheのRewriteモジュールが必要です。
# スマートURLの設定は、管理画面のシステム設定より行えます。
# (例)
# スマートURLオフ:http://localhost/index.php/contact/index
# スマートURLオン:http://localhost/contact/index
#
# 【スマートURLの設定に失敗した場合】
# /.htaccess と /app/webroot/.htaccess に記述されている
# RewriteBase 設定をサーバー環境に合わせて調整してください。
# マルチドメインの場合は、マルチドメインの設定フォルダを設定値に
# 付け加えるうまくいく事が多いようです。
#
# (例)マルチドメインのフォルダが「test」の場合
# RewriteBase /test
#
# 【スマートURLを手動でオンにする】
# ■ /.htaccess と /app/webroot/.htaccess にRewrite設定を記述する必要があります。
# /.htaccess では次の4行を記述します。
# RewriteEngine on
# RewriteBase /
# RewriteRule ^$ app/webroot/ [L]
# RewriteRule (.*) app/webroot/$1 [L]
# ■ /app/config/install.php に次の行を追加します。
# Configure::write('App.baseUrl', '');
#
# 【スマートURLを手動でオフにする】
# ■ /.htaccess と、/app/webroot/.htaccess 内の、次の行で始まる行を全て削除します。
# RewriteEngine / RewriteBase / RewriteCond / RewriteRule
# ■ /app/config/install.php の次の行を削除します。
# Configure::write('App.baseUrl', '');
#
# 【動作確認済レンタルサーバー】
# http://basercms.net/manuals/introductions/2.html
#

/testcms/app/webrootに設置の「.htaccess」
RewriteEngine on
RewriteBase /testcms/app/webroot
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]

#
# /app/webroot/.htaccess
#
# 【スマートURLについて】
# 短くスマートなURLを実現する為には、ApacheのRewriteモジュールが必要です。
# スマートURLの設定は、管理画面のシステム設定より行えます。
# (例)
# スマートURLオフ:http://localhost/index.php/contact/index
# スマートURLオン:http://localhost/contact/index
#
# 【スマートURLの設定に失敗した場合】
# /.htaccess と /app/webroot/.htaccess に記述されている
# RewriteBase 設定をサーバー環境に合わせて調整してください。
# マルチドメインの場合は、マルチドメインの設定フォルダを設定値に
# 付け加えるうまくいく事が多いようです。
#
# (例)マルチドメインのフォルダが「test」の場合
# RewriteBase /test/app/webroot
#
# 【スマートURLを手動でオンにする】
# ■ /.htaccess と /app/webroot/.htaccess にRewrite設定を記述する必要があります。
# /app/webroot/.htaccess には次の5行を記述します。
# RewriteEngine on
# RewriteBase /app/webroot
# RewriteCond %{REQUEST_FILENAME} !-d
# RewriteCond %{REQUEST_FILENAME} !-f
# RewriteRule ^(.*)$ index.php?url=$1 [QSA,L]
# ■ /app/config/install.php に次の行を追加します。
# Configure::write('App.baseUrl', '');
#
# 【スマートURLを手動でオフにする】
# ■ /.htaccess と、/app/webroot/.htaccess 内の、次の行で始まる行を全て削除します。
# RewriteEngine / RewriteBase / RewriteCond / RewriteRule
# ■ /app/config/install.php の次の行を削除します。
# Configure::write('App.baseUrl', '');
#
# 【動作確認済レンタルサーバー】
# http://basercms.net/manuals/introductions/2.html
#

現在、把握している症状としては、
・baserCMSが正常に表示している時は、サーバ直下の「.htaccess」で404時に正常にリダイレクト
・baserCMSが崩れてに表示している時は、サーバ直下の「.htaccess」で404時に無反応
・現在、先方の環境にあるディレクトリで「.htaccess」でBasic認証がかかっている箇所があり、
 同様に「.htaccess」が効いている時と効いていない時があります。
ログイン
ユーザー名:
パスワード:


  新規登録 / パスワード紛失

検索

facebook
フォーラムで悩みが解決した場合など、よかったら「いいね!」をポチっとクリックしてください!質問の回答者や開発者の励みになります

フォーラムガイド


関連リンク

オンライン状況
20 人のユーザが現在オンラインです。 (19 人のユーザが フォーラム を参照しています。)

登録ユーザ: 0
ゲスト: 20