N
N
Netscout2015-08-13 17:53:00
htaccess
Netscout, 2015-08-13 17:53:00

How to make a 301 redirect for multiple pages?

Hello !
Please tell me about this question ...
There are thousands of pages with addresses of this kind:
site.net/99-novosti_mira.html/5
site.net/99-novosti_mira.html/7

How to make a rule for 301 redirects to such pages:
site. net/page ,5,99-novosti_mira.html
site.net/page ,7,99-novosti_mira.html

Where 5 and 7 are subpage addresses.
I'm switching to wordpress with DLE and need to keep indexing in the search.
Thanks for the tip!

Answer the question

In order to leave comments, you need to log in

2 answer(s)
H
heartdevil, 2015-08-13
@heartdevil

Hello.
I haven't tested it, but try experimenting with it.

Options +FollowSymLinks
RewriteEngine On
RewriteCond %{HTTP_HOST} ^/site\.net/99-novosti_mira\.html/([0-9]+)$
RewriteRule ^(.*)$ site.net/page,%1,99-novosti_mira.html [R=301,L]

N
Netscout, 2015-08-14
@Netscout

I apologize wildly for the amateurishness in my question.
A little different ....
You need to do a 301 redirect for these news:

site.net/page,5,99-novosti_mira.html
site.net/page,7,99-novosti_mira.html

That is, redirect to the following:
site.net/99-novosti_mira.html/5
site.net/99-novosti_mira.html/7

At the same time, instead of "novosti_mira" there can be anything, absolutely any name.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question