Good evening, the essence of the question: There is a site created through wp multisite - doma.in/site1 . I want to rename it to doma.in/site2 .
How to make a 301 redirect so that all internal links are redirected to a new site in a subdirectory?
For example, to: doma.in/site1/sub1/sub2/ redirect to doma.in/site2/sub1/sub2/ .
Edits
When using the command:
RewriteCond %{REQUEST_URI} ^.*site1.* RewriteRule ^site1/(.*)$ https://doma.in/site2/$1? [R=301,L] doma.in/site1/ successfully redirects to the website doma.in/site2/ . But at the same time, links like doma.in/site1/123/321/ not redirected to doma.in/site2/123/321/ . And also the link without a slash doma.in/site1 does not redirect to doma.in/site2/ .