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

问题描述 投票:0回答:1

我正在尝试在whmcs上设置完整友好的URL,但我无法使配置工作。我尝试了各种配置,但似乎没有任何配置,并且那些工作突破了其他的东西,例如管理员网址。

https://whmcs.community/topic/291496-moderncurrent-76-nginx-rules/我试过这个,但它并不适用于所有网址

whmcs nginx-config
1个回答
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

© www.soinside.com 2019 - 2024. All rights reserved.