lets say I have a Vue2 application running by npm run dev commend (standard, official boilerplate). I am using vue-router to provide routing through the application.
I have some legacy urls from search engines which contains addresses to old version of my application e.g /foo,123,bar,456,baz.html
I have to support those kinds of links. I did it on Vue side (path like: /foo,:foo,bar,:bar,baz.html
but I got problems - Express server returns 404 - Cannot GET /foo,123,bar,456.baz.html
I did some digging and I found some solutions like adding rewrites to connect-history-api-fallback
rewrites: [
{
from: /^\/.*$/,
to: function(ctx) {
return ctx.parsedUrl.pathname.replace('.html', '');
}
}
],
it helps... but doesn't solve the problem...
Rewriting GET /foo,123,bar,456,baz.html to /foo,123,bar,456,baz
but...
Express still tries to go over /foo,123,bar,456,baz.html and returns 404.
Any ideas?