[使用技巧] WHMCS的Nginx伪静态规则

[使用技巧] WHMCS的Nginx伪静态规则

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

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

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

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

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

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

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

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

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

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

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

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

#社交媒体授权

    location ~ /auth/provider/google_signin/finalize/?(.*)$ {
        rewrite ^/(.*)$ /index.php?rp=auth/provider/google_signin/finalize$1;
    }

#WHMCS 后台

    location ~ /admin/(addons|apps|search|domains|help/license|services|setup|utilities/system/php-compat)(.*) {
        rewrite ^/(.*)$ /admin/index.php?rp=/admin/$1$2 last;
    }

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

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

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

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

    location ~ /admin/account/security/two-factor/?(.*)$ {
        rewrite ^/(.*)$ /admin/index.php?rp=/admin/account/security/two-factor/$1;
    }

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

#WHMCS 防扒皮

    location ~* \.(tpl|inc|cfg)$ {
        deny all;
    }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。

给TA打赏
共{{data.count}}人
人已打赏
WHMCS

从入门IDC到删库跑路之whmcs安装教程

2023-3-8 13:55:10

WHMCS

whmcs7.92-8.1.1前后台汉化中文语言包/Simplified Chinese

2023-3-8 14:19:29

0 条回复 A文章作者 M管理员
    暂无讨论,说说你的看法吧
个人中心
购物车
优惠劵
今日签到
搜索