D
D
Dmitry2019-05-21 10:36:48
htaccess
Dmitry, 2019-05-21 10:36:48

What is the correct way to cut off part of the url in .htaccess?

There is a URL like site.ru/korzina/add_korzina.html
It needs to be cut to look like site.ru/korzina
I wrote this rule, but it doesn't work:

RewriteEngine On
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /add_korzina\.html\ HTTP/
RewriteRule ^add_korzina\.html$ https://site.ru/korzina [R=301,L]

Question: how to make it work?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question