G
G
g_andy2021-01-12 20:33:13
URL Handling
g_andy, 2021-01-12 20:33:13

How to set a redirect for all pages included in a certain category?

There is a certain category and its subcategories that contain pages with full news. You need to redirect from such pages so that the category page opens.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2021-01-12
@g_andy

RedirectMatch 301 ^/(category)/[^/]+/[^/]+$ /$1
Or
RewriteRule ^(category)/[^/]+/[^/]+$ /$1 [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question