试图看看这是否可能。nginx相同的位置,但有不同的指令
我们有一个应用程序和wordpress安装。
是否可以在同一个文件夹中使用2个位置,但在不同情况下。例如..
http://domain.com/subfolder/ - 这显示了APP http://domain.com/subfolder/anything - 这说明WP永久
现在,我们有这么
http://domain.com/subfolder(不带/)显示应用
http://domain.com/subfolder/(带/)显示WP。
这并不工作,但它是可能有它的话,它只会显示WP如果该URL后,子文件夹/ *
当前的Nginx的conf包含文本:
location ^~ /knowledge {
root /opt/domain.com/public/;
try_files $uri @backend;
}
location /knowledge/ {
index index.php index.html index.htm;
root /opt;
include /etc/nginx/php-wpsc.conf;
try_files $uri $uri/ /knowledge/index.php?q=$uri&$args;
}