We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello! Need to catch THOUSANDS of old users url's matching: ^/([-_.a-zA-Z0-9]+)$ and redirect them to: /user/$1
^/([-_.a-zA-Z0-9]+)$
This is my rule, where app_pages are the app main paths:
let app_pages = [ ... 'admin', 'auth', 'tests', 'widgets', 'dev-login', 'user', ... ]; ... ... ... { from: '^/([-_.a-zA-Z0-9]+)$', to: (from, req) => { let param = req.url.match(from)[1]; if (app_pages.includes(param)) { //PROBLEM HERE: infinite loop return '/$1' } //this route has an asyncData function that checks $1 to show profile or to return 404 return '/user/$1' }, statusCode: 301 }, ...
How can i do something like return next() or not redirecting if it matches an app_pages path?
The text was updated successfully, but these errors were encountered:
:(
Sorry, something went wrong.
No branches or pull requests
Hello!
Need to catch THOUSANDS of old users url's matching:
^/([-_.a-zA-Z0-9]+)$
and redirect them to: /user/$1
This is my rule, where app_pages are the app main paths:
How can i do something like return next() or not redirecting if it matches an app_pages path?
The text was updated successfully, but these errors were encountered: