Answer the question
In order to leave comments, you need to log in
How to correctly set up redirects from the old site from the subdirectory?
Good afternoon!
Such a task.
There was a site on WP - urls were uploaded .html (but only for pages, not for products)
Now a new site on ocstore - all urls - without .html
The old site is in the directory /old/
Plus, the url of the products has changed. There was /product/sumka-temno-sinyaya-s191/ (now it's /old/product/sumka-temno-sinyaya-s191/) and now it's /product-category/sumka-love-moschino
And one more thing.. ocstore makes duplicates.
The product is available both at /product-category/sumka-love-moschino and at /product-category/aksessuary2/sumka-love-moschino i.e. subheading is added.
As you can see, there are many questions.
But I feel that all solutions are nearby. in htaccess settings
1. It is necessary that everything is redirected from the old site from the /old directory to the new ones, without .html where it was
2. Remove duplicates so that the product is available only at /product-category/sumka-love-moschino
3. And in addition remove /?route=common/home from the main (when clicking on the logo)
Thanks in advance.
Oct Store 2.3.0.2.3
Answer the question
In order to leave comments, you need to log in
Two sites and two .htaccess files
/.htaccess
/old/.htaccess
/old/product/ryukzak-srednij-love-moschino/
will be processed by the rules from the file /old/.htaccess
RewriteRule ^old/product/(.+)$ /$1 [L,R=301]
The first RewriteRule is passed the path from where the .htaccess is to the requested file.
product/ryukzak-srednij-love-moschino/
RewriteRule ^product/(.+)$ /$1
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question