I have enabled store codes for my Magento website and it is working fine. I have two store views, arabic and english. For arabic, i have store code
en for english. My default store view is arabic.
Now google has indexed my website and when store code in urls are enabled, then old urls for catalog are not working and it gives a 404 error page. It is very bad for my website SEO.
I want to have a way, that if a customer comes to old url (which doesnt have a store code), then the customer should be redirected to the equivalent url which has a default store code. For example, if a customer comes to
the customer should be redirected to
so that the customer doesnt go to 404 page.
Strange thing is that the above criteria is working for cms pages, customer pages etc, and is not working only for catalog pages (category and products).
My website is on a debian 7 server with nginx and php5.5 fpm and magento version is 1.8.0.
Thanks for the guidance.