_redirect rules are ignored when using sveltekit

Hello, I've set up the _redirects file for my domain to redirect some old URLs to new ones when i moved from php to sveltekit on cf a few months ago. Initially I deployed it as static assets (using sveltekit's static adapter) however recently I wanted to start using some server-side logic so I changed to use the cloudflare pages adapter, which uses a _worker.js I've noticed that the _redirect rules do not apply anymore. Is there any way around this (set _redirects to have a higher priority than the worker)
3 Replies
GregBrimble
GregBrimble2y ago
Not currently, I'm afraid. You'll need to manage to redirects in your SvelteKit application or using a tool like Bulk Redirects.
ajgeiss0702
ajgeiss0702OP2y ago
ok, thank you
que curvero noches perra
if you use a empty file as your redirect route it works so if you have domain.net/blah and it redirects in your _redirects file, you can add a blank file named "blah" in the static folder and it will take the redirect
Want results from more Discord servers?
Add your server