I just deleted multi store views for my magento 2 store.
the deleted page resulted in 404 error: Page not found..
I want to 301 redirect these dead pages of dead store views to main store views.
Main store views: http://www.imdomain.com
FR store views: http://www.imdomain.com/fr/
DE store views: http://www.imdomain.com/de/
same as category page
Thanks so much for your help! My magento version is v2.2.0
I guess you will need the list of URLs that won't work anymore (because you've deleted the stores) and then you will need to create the redirects.
You can use .htacess if you are using Apache or you can add the redirects to your vhost configuration.
Another options could be to use the Magento URL rewirte option but I guess you'll get better performance adding the URLs to your vhost configuration.