将参数附加到nginx上的移动子域的request_uri
我在nginx 1.9.3 / OpenBSD 5.8上运行了一个多语言wiki(MediaWiki 1.26.2和MobileFrontend )。 对于每种语言wiki,我都有一个单独的MediaWiki安装文件夹和一个像en.domain.com这样的子域指向该文件夹。 我想使用桌面视图的MediaWiki安装文件夹为移动视图添加一个像en.m.domain.com这样的子域名,但要添加&mobileaction=toggle_view_mobile (或?mobileaction=toggle_view_mobile ,带有问号而不是&符号如果已经有一个参数)。 我也使用CORS, 短url和从http://到https://redirect。 这是我的服务器块的样子: server { listen 80; server_name en.m.domain.com; root /path/to/domain/en; index index.html index.htm index.php; autoindex off; # CORS add_header 'Access-Control-Allow-Origin' '*'; add_header 'Access-Control-Allow-Credentials' 'true'; add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS'; add_header 'Access-Control-Allow-Headers' 'X-Requested-With, Accept, Content-Type, Origin'; # Redirect to https:// if ($http_cf_visitor ~ '{"scheme":"http"}') […]