here is my .htaccess somebody please help me write the nginx version. i used converter but didnt works well. please help me and add comment the code please.
------------------------------------[begin]--------------------------
# 404 ERROR NOT FOUND PAGE
ErrorDocument 404 /404.php
# 301 REDIRECT add WWW
RewriteCond %{HTTP_HOST} ^website.com$ [NC]
RewriteRule ^(.*)$ http://www.website.com/$1 [r=301,nc]
# IP Canonicalization/ change IP to domain name
RewriteCond %{HTTP_HOST} ^111\.222\.333\.444
RewriteRule (.*) http://www.website.com/$1 [R=301,L]
# NO rewrite for exact file/folder name. ex: website.com/index.php and website.com/admin
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
# modul. ex: website.com/news and website.com/news/page/3
RewriteRule ^([^/]+)/?$ index.php?mod=$1 [QSA,L]
RewriteRule ^([^/]+)/page/([0-9]+)/?$ index.php?mod=$1&page=$2 [QSA,L]
#detail content. ex: website.com/news/123/title-news.html or website.com/news/123/title-news or website.com/news/123
RewriteRule ^([^/]+)/([0-9]+)/[^/]+\.html$ index.php?mod=$1&id=$2 [QSA,L]
RewriteRule ^([^/]+)/([0-9]+)/([^/]+)/?$ index.php?mod=$1&id=$2 [QSA,L]
RewriteRule ^([^/]+)/([0-9]+)/?$ index.php?mod=$1&id=$2 [QSA,L]
-------------------------------[end]--------------------------------
thanks