htaccess to nginx converter

mohammad.983

Verified User
Joined
Jun 26, 2015
Messages
35
Hi guys.
could you help me to convert these roles to nginx
I use some online site converter and put the result in "Custom HTTPD Configurations
"
but it didnt work at all

Code:
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]

<FilesMatch "license.key">
Deny from all
</FilesMatch>

ErrorDocument 404 /member/error.php
 
I found out these codes.
It doesnot problem with the main page.but other pages didnt work

Code:
 location / {
    try_files $uri $uri/ $uri/index.php /index.php;

}
error_page 404 /member/error.php;
location ~ license.key {
deny all;
}
 
Back
Top