How is 302 Redirect Happening?
Magento is a great platform with a huge number of options and capabilities but 302 redirects is something that takes place on almost every eCommerce/blog website.
There a lot of issues about 302 redirection in Magento
.
Sometimes you set 301 redirect in System > Configuration > General > Web > Url Options
but it keeps showing 302, sometimes you get alerts about a huge number of pages like example.com/blog/post/1234
with 302 redirection, etc.
Magento automatically sets 302 redirects for urls like:
- Add to Compare
- Add to wishlist
- Switch currency
- Switch location
- ...
(Source: https://www.mavenecommerce.com/blog/302-redirects-in-magento/)
So try to go to System > Configuration > General > Web > Url Options
to change (if possible) directly from the option of Magento. It's probably possible to change it directly from there.
I found out the issue.
This had to do with 'routing' in Magento. There is a function called addRoute and I did a grep on the server looking for 'addRoute' and found a bunch of files it was happening in.
I was able to then locate the folder where the whole blog module was doing the redirect and had to just go through the logic of module and disable some of the functions in it's class.