【もしもAPI プログラム】同一ドメインで下層ディレクトリにサイトを追加する設定 Brave Inc.

【もしもAPI プログラム】同一ドメインで下層ディレクトリにサイトを追加する設定

【もしもAPIによる自動ドロップシッピングサイトプログラム】
にて上位にサイトを設置していて、その下のフォルダに当プログラムによるサイトを増設する場合の設定について説明いたします。
例、
現在設置しているサイト→http://○○○.com/
これから設置したいサイト→http://○○○.com/111/

【さくらインターネットの場合】
①moshimo_api_pack > .htaccess
(設置先http://○○○.com/111/.htaccess)
を次のように書き換えます。
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /○○○/111/index.php?/$1 [L]

②moshimo_api_pack > application > config > config.php
(設置先http://○○○.com/111/application/config/config.php)
の次の箇所を書き換えます。
$config['base_url'] = 'http://○○○/111/';

【XREA,CORESERVERの場合】
①moshimo_api_pack > .htaccess
(設置先http://○○○.com/111/.htaccess)
を次のように書き換えます。
RewriteEngine on
RewriteCond $1 !^(index\.php|css|.+\.gif$|.+\.jpg$|.+\.png$|.+\.js$|.+\.xml$)
RewriteRule ^(.*)$ /111/index.php/$1 [L]

②moshimo_api_pack > application > config > config.php
(設置先http://○○○.com/111/application/config/config.php)
の次の箇所を書き換えます。
$config['base_url'] = 'http://○○○/111/';

同一ドメイン複数サイト設置デモ
http://moshi.wainavi.net/
http://moshi.wainavi.net/moshimo

2012-02-05 13:39:59