How would I set up a route in Amazon Route 53 ou/e S3
as I do in nodejs
with express
? below.
app.get('/', function (req, res) {
res.sendFile(path.join(__dirname + '/website/index.html'));
});
app.get('/login', function (req, res) {
res.sendFile(path.join(__dirname + '/login.html'));
});
//Se for qualquer outra rota
app.get('/*', function (req, res) {
res.redirect('login.html?group='+req.url.substr(1));
});
In short, the directions I want would be
www.meusite.com.br -> index.html
www.meusite.com.br/login -> login.html
www.meusite.com.br/abc -> login.html?group=abc
www.meusite.com.br/aaaa -> login.html?group=aaaa
I would like to use AmazonCloud front + S3
and I am not seeing how to route this way I do with nodejs, I tried to see if I could with Route 53
but could not.
I could just leave running a nodejs
application with this routing and heading to CloudFront
but I do not really like this idea, the good thing would be straightforward by Amazon