You can do it in the following way.
Create the new product attribute set enable for redirect products.
Now Create event using your custom module
(NOTE: If you don't have any module then create new module and then create event in that)
So in your events.xml add following code
<?xml version="1.0" ?>
Please try to clear the cache.
You can clear cache using admin:
> System > Cache Management
Also, You can use command to clear cache:
Open the terminal and run below command:
php bin/magento c:f && php bin/magento c:c
If it helps you, please accept it as a solution.
Just to close this out, a good friend of mine suggested I try this,
and I am very pleased to say it worked. Perhaps it will help someone
else who faces the same issue: In .htaccess file, add these lines:
# Detect the ELB header and set the header magento expects
SetEnvIf X-Forwarded-Proto https ...
The most common cause of redirect loops is due to a combination of
a redirect performed by your origin web server, and
a Cloudflare SSL option that is incompatible with the redirect performed by your origin.
The Flexible SSL option within the Cloudflare SSL/TLS app encrypts traffic between the browser and the Cloudflare network over HTTPS. However,...