ErrorDocument 404 https://www.graminoacid.com/index.html

<FilesMatch ".(flv|gif|jpg|jpeg|png|ico|swf|css|js|mp4)$">
Header set Cache-Control "max-age=864000"
</FilesMatch>

RewriteEngine on 


RewriteCond %{HTTP_HOST} ^ger.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com/ger%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^es.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com/es%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^pt.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com/pt%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^jp.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com/jp%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^kr.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com/kr%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^ae.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com/ae%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^it.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com/it%{REQUEST_URI} [R=301,L]
RewriteCond %{HTTP_HOST} ^en.graminoacid.com [NC]
RewriteRule .? https://www.graminoacid.com%{REQUEST_URI} [R=301,L] 

RewriteCond %{HTTP_HOST} ^([a-z.]+)?graminoacid.com$ [NC] 
RewriteCond %{HTTP_HOST} !^www. [NC] 
RewriteRule .? https://www.graminoacid.com%{REQUEST_URI} [R=301,L] 

RewriteRule ^search.html$ search.php 
RewriteRule ^search_([0-9]+)_([0-9]+)_(.*).html$ search.php?page=$1&page2=$2&keywords=$3 [QSA,L] 
RewriteRule ^search_(.*).html$ search.php?keywords=$1

RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.graminoacid.com/$1 [R,L]