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 1


You can export URL structure and create a .php file in root of magento with below code.


$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"); 

Include above .php file in index.php to redirect them on new website. .

  • make sure above only change in request path not in target path
    – Gem
    Commented Sep 21, 2016 at 10:42
  • 1
    This is a core script. You just need to prepare your array according to your changes in URLs. Commented Sep 21, 2016 at 10:50
  • bro, i need just bulk add url rewrite management. so how can i add bulk url rewrite
    – Gem
    Commented Sep 22, 2016 at 5:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.