.htaccessファイルに次の書き換えルールがあります
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?$1 [L,QSA]
</IfModule>
index.phpファイルでは、PHPメール関数を介して自分自身にメールを送信しています。
<?php
$body = "<html>";
$body .= "<body>";
$body .= $_SERVER['REMOTE_ADDR'];
$body .= "</body>";
$body .= "</html>";
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
$headers .= 'From: XXX@domain.com' . "\r\n";
mail('XXX@mail.com', 'IP TEST', $body, $headers, "-fXXX@domain.com");
?>
Webブラウザhttp://sub.domain.comでURLにアクセスすると、2通の電子メールが送信されます。
http://sub.domain.com/index.phpにアクセスするときも同じです
.htaccessファイルのすべてをコメントアウトすると、1通の電子メールのみが送信されます。
理解できません!