joomla在nginx服务器上,设置 短连 时,需要修改nginx配置文件:nginx/conf/nginx.conf
添加以下内容:
如果网站为根目录时:
location / {
try_files $uri $uri/ /index.php?q=$uri&$args;
}
若果为二级目录时:
location /cn/ {
try_files $uri $uri/ /cn/index.php?q=$uri&$args;
}
或者用 rewrite:
location /cn/ {
if (!-e $request_filename) {
rewrite ^/cn/(.*)$ /cn/index.php?q=$uri&$args;
}
}