Browse Source

Add WHMCS rewrite conf

Connection Refused 5 years ago
parent
commit
c87f84385e
2 changed files with 40 additions and 1 deletions
  1. 39 0
      config/whmcs.conf
  2. 1 1
      vhost.sh

+ 39 - 0
config/whmcs.conf

@@ -0,0 +1,39 @@
+location ~ /billing/announcements/?(.*)$ {
+	rewrite ^/(.*)$ /billing/index.php?rp=/announcements/$1;
+}
+
+location ~ /billing/download/?(.*)$ {
+	rewrite ^/(.*)$ /billing/index.php?rp=/download$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/cart/domain/renew/?(.*)$ {
+	rewrite ^/(.*)$ /billing/index.php?rp=/cart/domain/renew$1;
+}
+
+location ~ /billing/account/paymentmethods/?(.*)$ {
+	rewrite ^/(.*)$ /billing/index.php?rp=/account/paymentmethods$1;
+}
+
+location ~ /billing/admin/(addons|apps|domains|help\/license|services|setup|utilities\/system\/php-compat)(.*) {
+	rewrite ^/(.*)$ /billing/admin/index.php?rp=/admin/$1$2 last; 
+}

+ 1 - 1
vhost.sh

@@ -558,7 +558,7 @@ Nginx_rewrite() {
     echo
     echo "Please input the rewrite of programme :"
     echo "${CMSG}wordpress${CEND},${CMSG}opencart${CEND},${CMSG}magento2${CEND},${CMSG}drupal${CEND},${CMSG}joomla${CEND},${CMSG}codeigniter${CEND},${CMSG}laravel${CEND}"
-    echo "${CMSG}thinkphp${CEND},${CMSG}pathinfo${CEND},${CMSG}discuz${CEND},${CMSG}typecho${CEND},${CMSG}ecshop${CEND},${CMSG}nextcloud${CEND},${CMSG}zblog${CEND} rewrite was exist."
+    echo "${CMSG}thinkphp${CEND},${CMSG}pathinfo${CEND},${CMSG}discuz${CEND},${CMSG}typecho${CEND},${CMSG}ecshop${CEND},${CMSG}nextcloud${CEND},${CMSG}zblog${CEND},${CMSG}whmcs${CEND} rewrite was exist."
     read -e -p "(Default rewrite: other): " rewrite
     if [ "${rewrite}" == "" ]; then
       rewrite="other"