V
V
Vlad2018-12-05 16:53:20
htaccess
Vlad, 2018-12-05 16:53:20

How to properly redirect through .htaccess?

RewriteRule ^et/catalog/kuldehted/sormused/pulma-sormused/?$ /et/catalog/kuldehted/sormused/abielusormused [R=301,L]

Please tell me how to write a redirect in one line for the following 2 cases:
et/catalog/kuldehted/sormused/pulma-sormused/ -> /et/catalog/kuldehted/sormused/abielusormused
ru/catalog/kuldehted/sormused/pulma-sormused/ -> /ru/catalog/kuldehted/sormused/abielusormused
It is necessary to add a variable instead of the language at the beginning of the url... I don't know how..

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
dodo512, 2018-12-05
@Sc0undRel

RewriteRule ^(et|ru)/catalog/kuldehted/sormused/pulma-sormused/?$ /$1/catalog/kuldehted/sormused/abielusormused [R=301,L]

Or
RewriteRule ^(et|ru)/(catalog/kuldehted/sormused)/pulma-sormused/?$ /$1/$2/abielusormused [R=301,L]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question