Replies: 6 comments
-
You may need to include the query string as well? /index.php?_=$1&$args |
Beta Was this translation helpful? Give feedback.
-
Adding the two subdirectory excludes. Removed ? from rewrite to automatically append the query. server {
listen 80;
server_name mecha.local;
access_log /home/example/web/mecha/access-logs/access.log;
error_log /home/example/web/mecha/access-logs/error.log;
root /home/peter/example/mecha/public_html;
index index.php;
location ^~ /engine {
deny all;
return 404;
}
location ^~ /lot {
deny all;
return 404;
}
location / {
try_files $uri $uri/ @rewrite;
}
# Include PHP 7 config.
include /home/example/web/nginx.php7.conf;
location @rewrite {
rewrite ^/(.*)$ /index.php?_=$1 last;
}
} |
Beta Was this translation helpful? Give feedback.
-
What will happen with the |
Beta Was this translation helpful? Give feedback.
-
I found the CSS problem and added two allows for it. The lot/x/*/lot/asset problem is an estimate as I did not find a test for it. server {
listen 80;
server_name mecha.local;
access_log /home/example/web/mecha/access-logs/access.log;
error_log /home/example/web/mecha/access-logs/error.log;
root /home/example/web/mecha/public_html;
index index.php;
location ^~ /engine {
deny all;
return 404;
}
# The following allow has to be before lot deny.
location ~ /lot/x/.*/lot/asset/ { allow all; }
location ^~ /lot {
deny all;
return 404;
}
location ^~ /lot/asset { allow all; }
location ^~ /lot/layout/asset { allow all; }
location / { try_files $uri $uri/ @rewrite; }
# Include PHP 7 config.
include /home/example/web/nginx.php7.conf;
location @rewrite {
rewrite ^/(.*)$ /index.php?_=$1 last;
}
} |
Beta Was this translation helpful? Give feedback.
-
I am no longer working on a Mecha test site. The test site had no added extensions to test assets in subfolders of x. Any future requirements will have to be worked out by someone else. |
Beta Was this translation helpful? Give feedback.
-
This gist should become the final result. I will try to keep it up-to-date. |
Beta Was this translation helpful? Give feedback.
-
I could not find an Nginx configuration example so I used the following.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Beta Was this translation helpful? Give feedback.
All reactions