403Webshell
Server IP : 185.208.173.17  /  Your IP : 87.236.161.98
Web Server : Microsoft-IIS/10.0
System : Windows NT SRV8576125506 10.0 build 26100 (Windows Server 2016) AMD64
User : IUSR ( 0)
PHP Version : 7.4.13
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  C:/inetpub/wwwroot/parsmega.nuxt/middleware/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : C:/inetpub/wwwroot/parsmega.nuxt/middleware/redirects.js
const redirects = [
  //articles
  {
    from: "/articles/36-industrial-automation/54-تفاوت-لودسل-4-سیم-و-6-سیم",
    to: "/articles/post/تفاوت-لودسل-4-سیم-و-6-سیم",
  },
  {
    from: "/articles/36-industrial-automation/49-روش-های-تست-لودسل",
    to: "/articles/post/روش-های-تست-لودسل",
  },
  {
    from:
      "/articles/36-industrial-automation/40-افزایش-دقت-اندازه-گیری-لودسل-به-کمک-ارت",
    to: "/articles/post/افزایش-دقت-اندازه-گیری-لودسل-به-کمک-ارت",
  },

  //categories
  { from: "/products/weight", to: "/products/category/weight" },
  { from: "/products/converter", to: "/products/category/analog-converter" },
  {
    from: "/products/relay-board",
    to: "/products/category/io-development-module",
  },
  {
    from: "/products/controlers",
    to: "/products/category/io-development-module",
  },

  //products
  {
    from: "/products/converter/usb/usb-rs485-isolated-converter",
    to: "/products/مبدل-usb-به-rs485-ایزوله-pm-us01",
  },
  {
    from:
      "/products/weight/transmitter/pm-ltd11a-weight-transmitter-analog-digital-rs485",
    to: "/products/ترانسمیتر-و-نمایشگر-وزن-pm-ltd11a",
  },
  {
    from:
      "/products/weight/transmitter/pm-ltd11t-weight-transmitter-digital-rs485",
    to: "/products/ترانسمیتر-و-نمایشگر-وزنpm-ltd11r",
  },
  {
    from: "/products/weight/indicator/pm-ld01-weight-indicator-rs485",
    to: "/products/نمایشگر-وزن-pm-ld01",
  },
  {
    from: "/products/weight/indicator/pm-ld01a-weight-indicator-rs485-analog",
    to: "/products/نمایشگر-وزن-pm-ld01a",
  },
  {
    from: "/products/weight/indicator/pm-ld31-weight-indicator-rs485",
    to: "/products/نمایشگر-وزن-pm-ld31",
  },
  {
    from: "/products/weight/indicator/pm-ld31a-weight-indicator-rs485-analog",
    to: "/products/نمایشگر-وزن-pm-ld31a",
  },
  {
    from:
      "/products/weight/transmitter/pm-lt11a-weight-transmitter-analog-rs485",
    to: "/products/ترانسمیتر-وزن-pm-lt11a",
  },
  {
    from: "/products/weight/transmitter/pm-lt11t-weight-transmitter-rs485",
    to: "/products/ترانسمیتر-وزن-pm-lt11t",
  },
  {
    from:
      "/products/weight/transmitter/pm-lt12a-2-channel-weight-transmitter-analog-rs485",
    to: "/products/ترانسمیتر-وزن-دو-کانال-pm-lt12a",
  },
  {
    from:
      "/products/weight/transmitter/pm-lt12t-2-channel-weight-transmitter-rs485",
    to: "/products/ترانسمیتر-وزن-دو-کانال-pm-lt12t",
  },
  {
    from:
      "/products/weight/transmitter/pm-lt12-2-channel-weight-transmitter-rs485",
    to: "/products/ترانسمیتر-وزن-دو-کانال-pm-lt12",
  },
  {
    from:
      "/products/temperature-humidity/display/temperature-indicator-controller-pm-tdc21",
    to: "/products",
  },
  {
    from: "/products/controlers/two-chanel-vibrate-controller",
    to: "/products/کنترلر-ویبره-دو-کانال-pm-vc12",
  },
  {
    from: "/products/converter/analog/signal-isolator-pm-iso11",
    to: "/products/سیگنال-ایزولاتور-pm-iso11",
  },
  {
    from: "/products/converter/analog/analog-converter-transmitter-pm-at13",
    to: "/products/ترانسمیتر-آنالوگ-3-کانال-pm-at13",
  },
  {
    from: "/products/relay-board/remote-io-rtu-module-pm-rio18t",
    to: "/products/ماژول-ریموت-io-خروجی-ترانزیستور-pm-rio18t",
  },
  {
    from: "/products/relay-board/remote-io-rtu-module-pm-rio18l",
    to: "/products/ماژول-ریموت-io-خروجی-رله-5-آمپر-pm-rio18l",
  },
  {
    from: "/products/relay-board/remote-io-rtu-module-pm-rio18h",
    to: "/products/ماژول-ریموت-io-خروجی-رله-16-آمپر-pm-rio18h",
  },
  {
    from: "/products/relay-board/relay-board-8",
    to: "/products/برد-رله-8-کانال-pm-rl08s",
  },
  {
    from: "/products/ترانسمیتر-دما-ترموکوپل-pm-tct11",
    to: "/products/ترانسمیتر-دما-تک-کانال-ترموکوپل-pm-tt1x",
  },
];

export default function(req, res, next) {
  var url = req.url.split("?")[0];
  var urlParams = null;
  if (req.url.includes("?")) urlParams = "?" + req.url.split("?")[1];

  const redirect = redirects.find((r) => encodeURI(r.from) === url);

  if (redirect) {
    var newLocation = redirect.to;
    if (urlParams) newLocation += urlParams;

    res.writeHead(301, { Location: encodeURI(newLocation) });
    res.end();
  } else next();
}

Youez - 2016 - github.com/yon3zu
LinuXploit