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;
}
}