B
B
bossigorxxx2020-11-19 14:27:11
htaccess
bossigorxxx, 2020-11-19 14:27:11

How to change url from subcategory to category?

Need to change category site links from category/category/vidy-sporta/box/ to category/vidy-sporta/box/

Tried

RewriteEngine   on
RewriteBase     /
RewriteRule ^category/category/(.*)$ /category/$1 [R=301,L]


Does not help

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Viktor Taran, 2020-11-19
@shambler81

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

give all htaccess and what specifically doesn't work

D
dodo512, 2020-11-19
@dodo512

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

Your working rule is simply put it in the wrong place.
It must be placed at the beginning of .htaccess in order for it to work before RewriteRule . /index.php [L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question