Hi, i have a site: https://bestcaliforniamovers.com/
And i want to use rule like this one
/* t=:value1 /:value1 302 in _redirects file.
so urls like
https://bestcaliforniamovers.com/?t=bing will become https://bestcaliforniamovers.com/bing/
But by some reason its not working, can you help me figure out why
Don’t you mean 301 instead of 302?
It might also be caching, try in another browser which you didn’t use yet.
Or maybe even try private browsing for testing purposes.
I wanted to test it for first time, with 302 and then use 301
Even this exact rule not working
Can you help me please?
Did you try to redirect by using the
netlify.toml file yet?
@bestcaliforniamovers, you need to use
! is important).
@hrishikesh works with
302!, but now i got too many redirects. Cause redirect leave query params in url
/store id=:id /blog/:id 301
The following match redirects a URL like:
/blog/my-blog-post with a
301 redirect. This affects request URLs with an
id query parameter only.
But i got /blog/my-blog-post?id=my-blog-post
My rules looks like:
/* t=:value1 /:value1 302!
Query params are preserved when redirecting unless you override them. So you ca change the redirect to:
/store id=:id /blog/:id?redirected=true 302!
or any other query param for that matter