My nginx server is not allowing for the php files on subfolder giving a 403
I have a apache that is running ok with a .htaccess
{
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^(.+)$ index.php?path=$1 [QSA,L]
RewriteRule ^(.*)\.[\d]{10}\.(css|js)$ $1.$2 [L]
}
The folder structure is like this :
-root
-- Classes
-- Controllers
-- Includes
-- Models
-- Views
--- Home
---- home-view.php
-Index.php
The index is run and open on the browser, but in a button with a link that points to \views\home\ and should load the home-view.php by a controller it's giving me a 403 forbidden, on apache all is working.
the nginx conf is :
root /var/www/html;
index index.php index.html index.htm;
server_name cityguide.com wwwcityguide.com
location / {
if (!-e $request_filename){
rewrite ^(.+)$ /index.php?path=$1 break;
}
rewrite "^/(.*)\.[\d]{10}\.(css|js)$" /$1.$2 break;
try_files $uri $uri/ =404
}