K
K
kostey692018-02-05 17:59:32
htaccess
kostey69, 2018-02-05 17:59:32

How to make a mass 301 redirect through htaccess with the replacement of the product address?

Hello.
Tell me how to make a 301 redirect of goods from all directories
from https://site.ru/cat1/cat2/.../product buy.html
(with a space before "buy.html")
to https://site.ru/ cat1/cat2/.../productbuy.html
(no space before "buy.html")
while maintaining the url structure.
where, product is any value.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2018-02-06
@shambler81

1. what idiot came up with making spaces in the url?
2. I hope to "buy" - this is not a genius who also came up with Russian letters to insert.
3. give 4 real urls, how it was how it became.

K
kostey69, 2018-02-06
@kostey69

The site has been inherited.
Buy prefix added to SEO Virtuemart. Pages indexed. Needs to be glued.
https://test.agromotor.by/zapchasti-k-traktoram-mt... buy.html
https://test.agromotor.by/zapchasti-k-traktoram-mt...
https:///zapchasti- buy.html /zapchasti-k-traktoram- mtz
-80-82-920-1221-1523-3022/razdatochnaya-korobka/em8117-14-elektromagnit -mtzbuy.html
/kosilki-rotatsionnye-i-segmentnye/nozh-kosilki-krs-2224-2363buy.html
https:///zapchasti-k-kommun-tekhn/kosilki-rotatsio... buy.html
https:// /zapchasti-k-traktoram-mtz-80-82-920-1221-... buy.html
/zapchasti-k-traktoram-mtz-80-82-920-1221-1523-3022/kabina-traktora-mtz/1937-30000-elektrodvigatel-otopitelya-12v-mtzbuy.html
URLs of this type.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question