Website: update /g route (#6694)

* Website: update /g route to redirect to /?meet-fleet

* update redirect to add the query string onto redirect url

* lint fix

* Changes from review

* Change var name to be technically true

Co-authored-by: Mike McNeil <mikermcneil@users.noreply.github.com>
This commit is contained in:
Eric
2022-07-18 20:54:53 -05:00
committed by GitHub
co-authored by Mike McNeil
parent dfe090edd4
commit 6ff5e82cfd
+1 -8
View File
@@ -162,14 +162,6 @@ module.exports.routes = {
}
},
'GET /g': {
action: 'view-landing',
locals: {
layout: 'layouts/layout-landing',
currentPage: 'landing',
}
},
'GET /reports/state-of-device-management': {
action: 'reports/view-state-of-device-management',
locals: {
@@ -239,6 +231,7 @@ module.exports.routes = {
'GET /docs/using-fleet/updating-fleet': '/docs/deploying/upgrading-fleet',
'GET /blog': '/articles',
'GET /brand': '/logos',
'GET /g': (req,res)=> { let originalQueryStringWithAmp = req.url.match(/\?(.+)$/) ? '&'+req.url.match(/\?(.+)$/)[1] : ''; return res.redirect(301, sails.config.custom.baseUrl+'/?meet-fleet'+originalQueryStringWithAmp); },
// Sitemap
// =============================================================================================================