I run below script in browser but I have more products and all finish in internal server error. Can I change URL for only configurable products? How can i re-generate URL key based on product name for each store view?
<?php
require 'app/Mage.php';
Mage::app();
Mage::getModel('catalog/product')->setStoreId(1);
$amount = 0;
$model = Mage::getModel('catalog/product');
$products = $model->getCollection();
foreach ($products as $product) {
$model->load($product->getId());
$product->setUrlKey($model->getName())->save();
set_time_limit();
$amount++;
}