そろそろ始めないといけないような気が… NP_CustomURL と ModRewrite を使ったマルチドメイン
Jan 30
RewriteEngine on
RewriteCond %{HTTP_HOST} foo\.example\.ne\.jp [NC]
RewriteCond %{REQUEST_URI} !^/bar/.*
RewriteRule (.*) /bar/$1 [L]

RewriteEngine on
RewriteCond %{HTTP_HOST} foo\.example\.ne\.jp [NC]
RewriteCond %{REQUEST_URI} !^/example/.*
RewriteRule (.*) index.php?virtualpath=/example/$1 [L,QSA]
RewriteCond %{HTTP_HOST} foo\.example2\.net [NC]
RewriteCond %{REQUEST_URI} !^/example2/.*
RewriteRule (.*) index.php?virtualpath=/example2/$1 [L,QSA]
RewriteCond %{HTTP_HOST} foo\.example3\.com [NC]
RewriteCond %{REQUEST_URI} !^/example3/.*
RewriteRule (.*) index.php?virtualpath=/example3/$1 [L,QSA]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?virtualpath=$1 [L,QSA]

これでマルチドメインできるかな?
明日実験

No Responses to “ きょうはもう寝るからメモ ”

Leave a Reply

OpenID を使ってログインすることができます。

Identity URL:



Web Services by Yahoo! JAPAN

このエントリにトラックバックはありません

この記事のトラックバックURL
http://shizuki.kinezumi.net/item_431.trackback(右クリックで'ショートカットの保存')
トラックバックするにはこの記事へのリンクhttp://shizuki.kinezumi.net/item_431.htmlが必要です