How to convert htaccess code into nginx syntax.

Basic syntax how htaccess from apache server convert into nginx platform.

This example is used to have a friendly URL path using OpenCart Ecommerce

Sample HTACCESS Code:

RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^ index.php [L]

Converted NGINX Syntax

# nginx configuration

location = /favicon.ico {

location /
{ if (!-e $request_filename){
     rewrite ^(.*)$ /index.php break;