How to change the address through htaccess?

Good day, got an address site.ru/category/159

How to change category via htaccess to something else?
July 9th 19 at 13:07
1 answer
July 9th 19 at 13:09
RewriteCond %{REQUEST_URI} ^(.*)/dir1/(.*)$ 
# if the line contains /dir1/ 
RewriteRule ^(.*)$ %1/dir2/%2 [R=301,L] 
#Redirect all URLs starting with from dir1 to dir2, preserving the future of the URL structure

Find more questions by tags htaccess