.htaccess to nginx in php standar

I have a file .htaccess.

Helicon Ape version 3.1.0.115

RewriteEngine On
DirectoryIndex index.php
RewriteRule ^administrator$ administrator/ [L]
RewriteRule ^administrator/$ administrator/ [L]

RewriteCond %{HTTP_HOST} ^www.(.)$ [NC]
RewriteRule ^(.
)$ http://%1/$1 [R=301,L]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?com=$1&idl=$2 [L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?com=$1&idc=$3 [L]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([0-9]+)x([0-9]+)x([0-9]+)/(.*).(jpg|jpeg|png|gif|JPG|PNG)$ timthumb_watermark.php?src=http://%{HTTP_HOST}/upload/$2/$6.$7&h=$4&w=$3&zc=$5&q=80 [L]

RewriteRule ^thumb/([0-9]+)x([0-9]+)/([0-9]+)/(.*)$ timthumb.php?w=$1&h=$2&zc=$3&q=80&src=http://%{HTTP_HOST}/$4 [L]

RewriteRule ^upload/product/(..(jp?g|gif|png))$ watermark.php?image=$1 [L]
RewriteRule ^upload/album/(.
.(jp?g|gif|png))$ watermark1.php?image=$1 [L]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?com=$1&idi=$4 [L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ index.php?com=$1&ids=$5 [L]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)&page=([0-9]+)$ index.php?com=$1&idl=$2&page=$3 [L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)&page=([0-9]+)$ index.php?com=$1&idc=$3&page=$4 [L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)&page=([0-9]+)$ index.php?com=$1&idi=$4&page=$5 [L]
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)&page=([0-9]+)$ index.php?com=$1&ids=$5&page=$6 [L]

RewriteRule ^([a-zA-Z0-9_-]+).html$ index.php?com=$1 [L]
RewriteRule ^([a-zA-Z0-9_-]+).html&page=([0-9]+)$ index.php?com=$1&page=$2 [L]

RewriteRule ^([a-zA-Z0-9_-]+).html&keywords=(.*)$ index.php?com=$1&keywords=$2&idl=$3&gia=$4 [L]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+).htm$ index.php?com=$1&lang=$2 [L]

RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+).html$ index.php?com=$1&id=$2 [L]

EXPIRES CACHING

ExpiresActive On ExpiresByType image/jpg "access 1 year" ExpiresByType image/jpeg "access 1 year" ExpiresByType image/gif "access 1 year" ExpiresByType image/png "access 1 year" ExpiresByType text/css "access 1 month" ExpiresByType text/html "access 1 month" ExpiresByType application/pdf "access 1 month" ExpiresByType text/x-javascript "access 1 month" ExpiresByType application/x-shockwave-flash "access 1 month" ExpiresByType image/x-icon "access 1 year" ExpiresDefault "access 1 month" ## EXPIRES CACHING ## AddOutputFilterByType DEFLATE text/* text/html text/xml text/css text/plain text/x-component text/x-js text/richtext text/xsd text/xsl AddOutputFilterByType DEFLATE image/svg+xml application/xhtml+xml application/xml image/x-icon AddOutputFilterByType DEFLATE application/rdf+xml application/rss+xml application/atom+xml AddOutputFilterByType DEFLATE text/javascript application/javascript application/x-javascript application/json AddOutputFilterByType DEFLATE application/x-font-ttf application/x-font-otf AddOutputFilterByType DEFLATE font/truetype font/opentype Header append Vary User-Agent env=!dont-vary AddOutputFilter DEFLATE js css htm html xml text

1 year

<FilesMatch “.(ico|pdf|flv)$”>
Header set Cache-Control “max-age=29030400, public”

1 WEEK

<FilesMatch “.(jpg|jpeg|png|gif|swf)$”>
Header set Cache-Control “max-age=604800, public”

2 DAYS

<FilesMatch “.(xml|txt|css|js)$”>
Header set Cache-Control “max-age=604800, proxy-revalidate”

2 DAYS

<FilesMatch “.(html|htm|php)$”>
Header set Cache-Control “max-age=604800, private, proxy-revalidate”

i can not config in to V4. anyone can help me ? please

NGINX doesn’t support htaccess. I don’t have an easy answer as to how to implement this. There are conversion utilities available but I have no idea how well they work. There are tutorials on how to write equivalent rewrite rules in NGINX.