Answer the question
In order to leave comments, you need to log in
How to strip part of URL using htaccess?
Hi all.
I need to
configure htaccess for the site
I need
to convert the https://site.com/category/odezhda format address to https://site.com/odezhda format .com/odezhda , but the site gives 404, but it needs to be shown to the user in the url site.com/odezhda, and the request went here site.com/category/odezhda RewriteRule ^category/(.+)$ /$1 [R=301,L]
Answer the question
In order to leave comments, you need to log in
RewriteCond %{REQUEST_URI} ^/dir1/(.*)$
# если строка начинается с /dir1/
RewriteRule ^(.*)$ /dir3/%1 [R=301,L]
#Перенаправить все урлы с начинающиеся с dir1 на dir2 с сохранением дальнейшей структуры URL
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question