Action myphp-script /php.cgi
AddHandler myphp-script .php .html

php_value display_errors Off
php_flag display_errors off

RewriteEngine On

# ★★★ Google対策: R=302(一時) → R=301(恒久) に変更 ★★★
# 302のままだとGoogleがリダイレクト元URLをインデックスしないため
RewriteCond %{HTTP_USER_AGENT} "iPhone|Android.*Mobile|Windows.*Phone" [NC]
RewriteCond %{REQUEST_URI} ^/$
RewriteRule ^$ https://www.classicharley.jp/mobile/ [R=301,L]
RewriteRule ^(.*)_No([0-9]+)\.html$ detail.php?num=$2 [L]


<IfModule mod_expires.c>
  ExpiresActive On
  FileETag Mtime Size
  Header set Last-Modified "%{filemtime}s"
  ExpiresByType text/css "access plus 1 weeks"
  ExpiresByType application/javascript "access plus 1 weeks"
  ExpiresByType text/javascript "access plus 1 weeks"
  ExpiresByType image/gif "access plus 1 weeks"
  ExpiresByType image/jpeg "access plus 1 weeks"
  ExpiresByType image/jpg "access plus 1 weeks"
  ExpiresByType image/png "access plus 1 weeks"
  ExpiresByType image/svg "access plus 1 weeks"
  ExpiresByType image/x-icon "access plus 1 weeks"
</IfModule>

<RequireAll>
Require all granted
Require not ip 66.249.79.238
Require not ip 66.249.79.236
</RequireAll>
