.htaccessファイルに次の構造を作成したいと思います。
If (SITE A DOMAIN or SITE A SUBDOMAIN) {
Rewrite this specific way -> /index.php/$1
} else {
Rewrite this specific way -> /directory/www/index.php/$1
}
以下に現在のコードがありますが、Apacheエラーログで500がスローされ、次のようなメッセージが表示されます。
[エラー][クライアント::1]mod_rewrite:内部リダイレクトの最大数に達しました。構成エラーを想定しています。必要に応じて、「RewriteOptions MaxRedirects」を使用して制限を増やします。、リファラー:
私は何が間違っているのですか?ありがとう!
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond $1 !^(index\.php|blog)
RewriteCond %{HTTP_HOST} ^subdomain\.example\.com$ [NC,OR]
RewriteCond %{HTTP_HOST} ^ example\.com$
RewriteRule .? - [S=1]
RewriteRule ^(.*)$ /directory/www/index.php/$1 [L]
RewriteRule .? - [S=1]
RewriteRule ^(.*)$ /index.php/$1 [L]