Hello, please help me converte apache rewrite rule to nginx: RewriteEngine on RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^naujienos+ news.php/$1 [L] RewriteRule ^naujienos/p(.*)$ /news.php?pg=$1 [nc] RewriteRule ^naujienos/?$ /news.php [nc] RewriteRule ^naujienos?$ /news.php [nc]
Have you tried these two .htaccess converters? http://winginx.com/htaccess http://www.anilcetin.com/convert-apache-htaccess-to-nginx/
Try Code: if (!-e $request_filename){ rewrite ^/naujienos+ /news.php/$1 break; } rewrite ^/naujienos/p(.*)$ /news.php?pg=$1; rewrite ^/naujienos/?$ /news.php; rewrite ^/naujienos?$ /news.php;