Answer the question
In order to leave comments, you need to log in
How to properly set up redirects when migrating a site to Wordpress?
It is required to transfer the site to Wordpress from a self-written engine. At the same time, URLs change and you need to set up redirection to new ones (about 20 pcs.).
The old urls look something like this:
http://имя_сайта/dostavka-i-oplata.html
http://имя_сайта/kontakty.html
http://имя_сайта/katalog/kormacat.html
https://имя_сайта/dostavka-i-oplata/
https://имя_сайта/kontakty/
https://имя_сайта/product-category/koshki/suhoj-korm-dlja-koshek/
RewriteRule ^dostavka\-i\-oplata\.html$ /dostavka-i-oplata/? [L,R=301]
RewriteRule ^kontakty\.html$ /kontakty/? [L,R=301]
RewriteRule ^katalog/kormacat\.html$ /product-category/koshki/suhoj-korm-dlja-koshek/? [L,R=301]
Answer the question
In order to leave comments, you need to log in
It is better to write 20 lines in the file than to install a plugin that litters the database.
If you had nginx, it would probably be easier through a plugin.
Redirect 301 /old/old.php /new/new.php
RewriteRule ^news/new.html /new.html [L,R=301]
are no different, so it doesn't matter
In your example, "\" should be replaced with "/"
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question