V
V
VPVPVP2020-10-26 20:38:00
htaccess
VPVPVP, 2020-10-26 20:38:00

How to set a redirect via httacess in case of a dynamic link?

If it is possible to make such a redirect through httacess?
There is a link like this
site.com/wp/category/*herecategoryname/

/*herecategoryname/ - this is a dynamic link, the categories are different, for example a/b/c/d/f etc..
is there an option to do this for all categories? To redirect to the following:

site.com/herecategoryname/

Or just do it with your hands separately for each category?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Taran, 2020-10-27
@shambler81

RewriteRule ^wp/category/\(.*)/$ /$1/? [L,R=301]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question