Whmcs友好的URL设置不适用于nginx。我怎样才能解决这个问题?

时间:2019-04-26 21:58:03

标签: whmcs nginx-config

我正在尝试在whmcs上设置完整的友好URL,但是我无法使配置正常工作。我尝试了各种配置,但似乎没有一种有效,并且那些有效的配置破坏了其他内容,例如管理url。

https://whmcs.community/topic/291496-moderncurrent-76-nginx-rules/ 我已经尝试过了,但是不适用于所有网址

1 个答案:

答案 0 :(得分:0)

尝试这些配置

    location ~ /billing/announcements/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/announcements/$1;
}

location ~ /billing/downloads/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/downloads/$1;
}

location ~ /billing/knowledgebase/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/knowledgebase/$1;
}

location ~ /billing/store/ssl-certificates/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/ssl-certificates/$1;
}

location ~ /billing/store/sitelock/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/sitelock/$1;
}

location ~ /billing/store/website-builder/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/website-builder/$1;
}

location ~ /billing/store/order/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/order/$1;
}

location ~ /billing/download/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/download$1;
}

location ~ /billing/cart/domain/renew/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/cart/domain/renew$1;

}

location ~ /billing/knowledgebase/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/knowledgebase/$1;
}

location ~ /billing/store/ssl-certificates/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/ssl-certificates/$1;
}

location ~ /billing/store/sitelock/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/sitelock/$1;
}

location ~ /billing/store/website-builder/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/website-builder/$1;
}

location ~ /billing/store/order/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/store/order/$1;
}

location ~ /billing/download/?(.*)$ {
    rewrite ^/(.*)$ /billing/index.php?rp=/download$1;
}

location ~ /billing/admin/setup/authn/view/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/setup/authn/view/$1;
}

location ~ /billing/admin/apps/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/apps$1;
}

location ~ /billing/admin/setup/notifications/overview/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/setup/notifications/overview$1;
}

location ~ /billing/admin/setup/storage/index/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/setup/storage/index$1;
}

location ~ /billing/admin/setup/payments/tax/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/setup/payments/tax$1;
}

location ~ /billing/admin/help/license/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/help/license$1;
}

location ~ /billing/admin/setup/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/setup$1;
}
location ~ /billing/admin/utilities/system/php-compat/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/utilities/system/php-compat$1;
}

location ~ /billing/admin/services/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/services$1;
}

location ~ /billing/admin/services/shared/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/services/shared$1;
}

location ~ /billing/admin/services/reseller/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/services/reseller$1;
}

location ~ /billing/admin/services/server/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/services/server$1;
}

location ~ /billing/admin/services/other/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/services/other$1;
}

location ~ /billing/admin/addons/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/addons$1;
}

location ~ /billing/admin/domains/?(.*)$ {
    rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/domains$1;
}

Reference