How can i add bulk URL Rewrite Management, i need to migrate new website
, but i have already promoted my old site products, so, after i change new site, old site url return blank page, or empty page. So i have add all my old site url into new site request path, my target path is my new site products url. so i have no problem after change my site.
1 Answer
You can export URL structure and create a .php file in root of magento with below code.
<?php
$pageurl['http://oldsiteurl/']='http://newsiteurl/';
$pageurl['http://oldsiteurl/']='http://newsiteurl/';
$pageurl['http://oldsiteurl/']='http://newsiteurl/';
$pageurl['http://oldsiteurl/']='http://newsiteurl/';
$current_url = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
if(array_key_exists($current_url, $pageurl))
{
$redirect_url = $pageurl[$current_url];
header("HTTP/1.1 301 Moved Permanently");
header("Location: $redirect_url");
exit;
}
Include above .php file in index.php to redirect them on new website. .
-
-
1This is a core script. You just need to prepare your array according to your changes in URLs. Sep 21, 2016 at 10:50
-
bro, i need just bulk add url rewrite management. so how can i add bulk url rewrite– GemSep 22, 2016 at 5:12