Good day to all! There is a rather large online store on bitrix. Needed a new version, under the old functionality. There is a copy of this store, with a new design connected. The development of the new site was carried out separately, but many old components were affected. Those. it is not enough to fill in a new template for the site to work.

I plan to transfer the site as follows - upload folders with a new version next to, for example, the folder / bitrix / and near / bitrix2 / and switch between them, thus having the ability to quickly roll back the changes.

The essence of the question: is it possible to somehow redirect requests to new folders, which will be about a half dozen by means of bitrix tools or by customizing .htaccess? So it would be much more convenient, instead of renaming all folders in turn.

Tried it, bitrix swears

RewriteEngine On RewriteBase / RewriteRule ^bitrix/(.*)$ /bitrix2/$1 [L,NC] 

Googled, read manuals, but could not find anything useful. The problem is most likely that I cannot correctly and briefly formulate a question.

I would be grateful for any hint, thank you.

    1 answer 1

    The standard de facto for such gestures is the switching of a symlink.

    Your DOCUMENT_ROOT is a link to the project directory. Switched the link to another project directory, made a web server reload - switched.

    The working version is to make another vhost that looks at the project folder with the redesign. Upload is placed separately so that it is available in projects by reference. Check that everything works correctly and switch the simlink. No redirects, no renames.