nginx上に複数のWebアプリを配置した場合の
.htaccessの書き方についてお伺いします。
▼ディレクトリ構成
{Webサーバルート}
│.htaccess
├/shop ←ECサイト用のWebアプリルート
│ index.php
└/blog ←ブログ用のWebアプリルート
index.php
▼現状の.htaccess
order deny,allow allow from all <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^(.*)$ /shop/ [L] </IfModule>
▼やりたいこと
domain.jp ⇒/shop/index.php
domain.jp/blog ⇒/blog/index.php
といった形で、ドメイン後のパスが/blogから始まる場合のみブログに飛ばすようにしたく、
RewriteEngine On以降を
RewriteBase / RewriteRule /^blog/$ /blog/ [L] RewriteRule ^(.*)$ /shop/ [L]
の様に変えてみたのですが、上手くいきません。
Webサーバのログを見ると、リダイレクトループしている様な旨のログが出ています。
AH00124: Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.
参照すべきサイトなどご紹介頂けると助かります。
よろしくお願いします。

回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。