We transfer the site from Magento to Bitrix. The task is the following: set up a redirect from the old URL of the site to the new ones. It would seem, like, - nonsense, but in urlah with Magento goes site_name/index.php/cat_name.html . I urlrewrite.php to register in urlrewrite.php this way:

 array( "CONDITION" => "#^/index.php/([0-9A-Za-z\\_\\-]+)\\.html#", "RULE" => "OLD_URL=Y&NAME=$1", "ID" => "", "PATH" => "/" ) 

As a result, all this trouble is ignored and the main page simply opens. Parameters are not transmitted. Can it be treated somehow, except by renaming the main index.php file?

  • What does it mean: "from an old site to a new one"? Did your domain change? - romeo
  • Well, you have written "PATH" => "/" - which page should open? Do you have a index.php handling in index.php ? Have you tried "PATH" => "/index.php" ? - u_mulder
  • No, the domain has not changed, but the urls will be different. - Paul
  • I just needed to pass a parameter that this is an old url and that's it - Paul
  • PATH - I, in fact, no matter where it is processed, the path does not really matter - Paul

1 answer 1

Long hours of discussion and reflection have led to the fact that there is no optimal way to make redirects after transferring the website to the bitrix.

For several large sites did the following:

  1. I generated a table of old addresses on the old site.
  2. I added an array of new page addresses on the new site. Since in my case it was necessary to make a redirect to 100 thousand products, then the old addresses of the pages were the keys of the array, and the values ​​were the new addresses.
  3. I saved the array in a separate file so that when the file is connected, the array is available.
  4. In init.php I connect the file and perform an array search by address. If there is such a key, then I make a standard Bitriksovsky redirect.

The option is not the best, since it slightly affects the performance, but if it is otherwise fine, then it is not critical. But it turns out quickly enough to do everything and there are no problems in the process.

After a month or two, just delete the file connection.