SyliusRedirectPlugin
SyliusRedirectPlugin copied to clipboard
Remove the permanent property?
Right now you can create two kinds of redirects: A permanent (301) and a temporary (302). My suggestion is to remove the ability to choose and instead make the 301 redirect the way to go.
I have created tons of redirects in my life during migrations of products etc. I have never in my life created a temporary redirect. Also you would never create a temporary redirect for SEO purposes. That would always be a permanent.
According the this article from Yoast a 302 redirect that is active for too long will be treated as a 301. This has the implication that in theory we should probably have an expiry date when creating a temporary (302) redirect. That will just add to the complexity of this plugin.
Removing the permanent/temporary option would also open up for this issue: https://github.com/Setono/SyliusRedirectPlugin/issues/62 which in turn would lower the complexity of the plugin.
Any thoughts / feedback is very welcome.
I also can't remember when I used a 302 unless it's for a specific migration. So I think it makes sense to me.
How long is too long? If a product is out of stock indefinitely, you may want to set up a temporary redirect to an alternative. That is the only use case I can think of.
Is that how people handle that use case, @veloxy? What I see around on stores is that stores still show the old product, but tell the user that they can get a similar product on another URL or they do a 301 redirect to begin with.