I am trying to redirect some URLs using .htaccess
but without any success.
The problem is that I have to redirect two different parts of the URL.
Here is an example of what I have to redirect:
example.com/huawei-reparatie/huawei-mate-7-reparatie
has to be redirected to:
example.com/reparatie/huawei/huawei-mate-7
So what has to be done:
- Split
huawei-reparatie
intoreparatie/huawei
- Remove the
-reparatie
at the end of every URL
These are dynamic URLs so it is not only this one. I have to redirect all these URLs for a lot of different brands (like huawei
) and a lot of different devices (like huawei-mate-7
)
I hope anyone can help me.